aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/sound/kernel-api/writing-an-alsa-driver.rst')
-rw-r--r--Documentation/sound/kernel-api/writing-an-alsa-driver.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
index f169d58ca019..fa4968817696 100644
--- a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
+++ b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
@@ -259,7 +259,7 @@ to details explained in the following section.
{
struct mychip *chip;
int err;
- static struct snd_device_ops ops = {
+ static const struct snd_device_ops ops = {
.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,
};
....
@@ -761,7 +761,7 @@ destructor and PCI entries. Example code is shown first, below.
{
struct mychip *chip;
int err;
- static struct snd_device_ops ops = {
+ static const struct snd_device_ops ops = {
.dev_free = snd_mychip_dev_free,
};
@@ -1058,7 +1058,7 @@ and the allocation would be like below:
return err;
}
chip->iobase_phys = pci_resource_start(pci, 0);
- chip->iobase_virt = ioremap_nocache(chip->iobase_phys,
+ chip->iobase_virt = ioremap(chip->iobase_phys,
pci_resource_len(pci, 0));
and the corresponding destructor would be:
@@ -3912,7 +3912,7 @@ For a raw-data proc-file, set the attributes as follows:
::
- static struct snd_info_entry_ops my_file_io_ops = {
+ static const struct snd_info_entry_ops my_file_io_ops = {
.read = my_file_io_read,
};