mirror of https://gitee.com/openkylin/linux.git
ALSA: docs: Constify snd_device_ops definitions
Update the documentation for adding the const prefix to snd_device_ops definitions as well. Link: https://lore.kernel.org/r/20200103081714.9560-20-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
c3b53df3d0
commit
e382d7fcfc
|
@ -259,7 +259,7 @@ to details explained in the following section.
|
||||||
{
|
{
|
||||||
struct mychip *chip;
|
struct mychip *chip;
|
||||||
int err;
|
int err;
|
||||||
static struct snd_device_ops ops = {
|
static const struct snd_device_ops ops = {
|
||||||
.dev_free = snd_mychip_dev_free,
|
.dev_free = snd_mychip_dev_free,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -675,7 +675,7 @@ low-level device with a specified ``ops``,
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
static struct snd_device_ops ops = {
|
static const struct snd_device_ops ops = {
|
||||||
.dev_free = snd_mychip_dev_free,
|
.dev_free = snd_mychip_dev_free,
|
||||||
};
|
};
|
||||||
....
|
....
|
||||||
|
@ -761,7 +761,7 @@ destructor and PCI entries. Example code is shown first, below.
|
||||||
{
|
{
|
||||||
struct mychip *chip;
|
struct mychip *chip;
|
||||||
int err;
|
int err;
|
||||||
static struct snd_device_ops ops = {
|
static const struct snd_device_ops ops = {
|
||||||
.dev_free = snd_mychip_dev_free,
|
.dev_free = snd_mychip_dev_free,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue