aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss')
-rw-r--r--sound/oss/ad1889.c4
-rw-r--r--sound/oss/au1550_ac97.c4
-rw-r--r--sound/oss/btaudio.c6
-rw-r--r--sound/oss/dmasound/dmasound_core.c6
-rw-r--r--sound/oss/emu10k1/audio.c2
-rw-r--r--sound/oss/emu10k1/midi.c2
-rw-r--r--sound/oss/emu10k1/mixer.c2
-rw-r--r--sound/oss/es1371.c3
-rw-r--r--sound/oss/hal2.c4
-rw-r--r--sound/oss/msnd_pinnacle.c2
-rw-r--r--sound/oss/nec_vrc5477.c4
-rw-r--r--sound/oss/os.h2
-rw-r--r--sound/oss/sh_dac_audio.c2
-rw-r--r--sound/oss/soundcard.c7
-rw-r--r--sound/oss/swarm_cs4297a.c3
-rw-r--r--sound/oss/via82cxxx_audio.c4
-rw-r--r--sound/oss/vwsnd.c4
17 files changed, 32 insertions, 29 deletions
diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c
index 09263d72a519..f0724327493c 100644
--- a/sound/oss/ad1889.c
+++ b/sound/oss/ad1889.c
@@ -778,7 +778,7 @@ static int ad1889_release(struct inode *inode, struct file *file)
778 return 0; 778 return 0;
779} 779}
780 780
781static struct file_operations ad1889_fops = { 781static const struct file_operations ad1889_fops = {
782 .owner = THIS_MODULE, 782 .owner = THIS_MODULE,
783 .llseek = no_llseek, 783 .llseek = no_llseek,
784 .read = ad1889_read, 784 .read = ad1889_read,
@@ -812,7 +812,7 @@ static int ad1889_mixer_ioctl(struct inode *inode, struct file *file,
812 return codec->mixer_ioctl(codec, cmd, arg); 812 return codec->mixer_ioctl(codec, cmd, arg);
813} 813}
814 814
815static struct file_operations ad1889_mixer_fops = { 815static const struct file_operations ad1889_mixer_fops = {
816 .owner = THIS_MODULE, 816 .owner = THIS_MODULE,
817 .llseek = no_llseek, 817 .llseek = no_llseek,
818 .ioctl = ad1889_mixer_ioctl, 818 .ioctl = ad1889_mixer_ioctl,
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c
index 219795171c71..a339f0c0d512 100644
--- a/sound/oss/au1550_ac97.c
+++ b/sound/oss/au1550_ac97.c
@@ -1354,11 +1354,11 @@ au1550_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
1354 ((file->f_mode & FMODE_READ) && s->dma_adc.mapped); 1354 ((file->f_mode & FMODE_READ) && s->dma_adc.mapped);
1355 1355
1356#ifdef DEBUG 1356#ifdef DEBUG
1357 for (count=0; count<sizeof(ioctl_str)/sizeof(ioctl_str[0]); count++) { 1357 for (count = 0; count < ARRAY_SIZE(ioctl_str); count++) {
1358 if (ioctl_str[count].cmd == cmd) 1358 if (ioctl_str[count].cmd == cmd)
1359 break; 1359 break;
1360 } 1360 }
1361 if (count < sizeof(ioctl_str) / sizeof(ioctl_str[0])) 1361 if (count < ARRAY_SIZE(ioctl_str))
1362 pr_debug("ioctl %s, arg=0x%lxn", ioctl_str[count].str, arg); 1362 pr_debug("ioctl %s, arg=0x%lxn", ioctl_str[count].str, arg);
1363 else 1363 else
1364 pr_debug("ioctl 0x%x unknown, arg=0x%lx\n", cmd, arg); 1364 pr_debug("ioctl 0x%x unknown, arg=0x%lx\n", cmd, arg);
diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c
index ad7210a00dc0..f845528e1fac 100644
--- a/sound/oss/btaudio.c
+++ b/sound/oss/btaudio.c
@@ -429,7 +429,7 @@ static int btaudio_mixer_ioctl(struct inode *inode, struct file *file,
429 return 0; 429 return 0;
430} 430}
431 431
432static struct file_operations btaudio_mixer_fops = { 432static const struct file_operations btaudio_mixer_fops = {
433 .owner = THIS_MODULE, 433 .owner = THIS_MODULE,
434 .llseek = no_llseek, 434 .llseek = no_llseek,
435 .open = btaudio_mixer_open, 435 .open = btaudio_mixer_open,
@@ -796,7 +796,7 @@ static unsigned int btaudio_dsp_poll(struct file *file, struct poll_table_struct
796 return mask; 796 return mask;
797} 797}
798 798
799static struct file_operations btaudio_digital_dsp_fops = { 799static const struct file_operations btaudio_digital_dsp_fops = {
800 .owner = THIS_MODULE, 800 .owner = THIS_MODULE,
801 .llseek = no_llseek, 801 .llseek = no_llseek,
802 .open = btaudio_dsp_open_digital, 802 .open = btaudio_dsp_open_digital,
@@ -807,7 +807,7 @@ static struct file_operations btaudio_digital_dsp_fops = {
807 .poll = btaudio_dsp_poll, 807 .poll = btaudio_dsp_poll,
808}; 808};
809 809
810static struct file_operations btaudio_analog_dsp_fops = { 810static const struct file_operations btaudio_analog_dsp_fops = {
811 .owner = THIS_MODULE, 811 .owner = THIS_MODULE,
812 .llseek = no_llseek, 812 .llseek = no_llseek,
813 .open = btaudio_dsp_open_analog, 813 .open = btaudio_dsp_open_analog,
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
index 80b836e80d99..a0ec886f2aa3 100644
--- a/sound/oss/dmasound/dmasound_core.c
+++ b/sound/oss/dmasound/dmasound_core.c
@@ -371,7 +371,7 @@ static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd,
371 return -EINVAL; 371 return -EINVAL;
372} 372}
373 373
374static struct file_operations mixer_fops = 374static const struct file_operations mixer_fops =
375{ 375{
376 .owner = THIS_MODULE, 376 .owner = THIS_MODULE,
377 .llseek = no_llseek, 377 .llseek = no_llseek,
@@ -1337,7 +1337,7 @@ static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd,
1337 return -EINVAL; 1337 return -EINVAL;
1338} 1338}
1339 1339
1340static struct file_operations sq_fops = 1340static const struct file_operations sq_fops =
1341{ 1341{
1342 .owner = THIS_MODULE, 1342 .owner = THIS_MODULE,
1343 .llseek = no_llseek, 1343 .llseek = no_llseek,
@@ -1561,7 +1561,7 @@ static ssize_t state_read(struct file *file, char __user *buf, size_t count,
1561 return n; 1561 return n;
1562} 1562}
1563 1563
1564static struct file_operations state_fops = { 1564static const struct file_operations state_fops = {
1565 .owner = THIS_MODULE, 1565 .owner = THIS_MODULE,
1566 .llseek = no_llseek, 1566 .llseek = no_llseek,
1567 .read = state_read, 1567 .read = state_read,
diff --git a/sound/oss/emu10k1/audio.c b/sound/oss/emu10k1/audio.c
index efcf589d7083..e75ea21eb811 100644
--- a/sound/oss/emu10k1/audio.c
+++ b/sound/oss/emu10k1/audio.c
@@ -1582,7 +1582,7 @@ static void emu10k1_waveout_bh(unsigned long refdata)
1582 return; 1582 return;
1583} 1583}
1584 1584
1585struct file_operations emu10k1_audio_fops = { 1585const struct file_operations emu10k1_audio_fops = {
1586 .owner = THIS_MODULE, 1586 .owner = THIS_MODULE,
1587 .llseek = no_llseek, 1587 .llseek = no_llseek,
1588 .read = emu10k1_audio_read, 1588 .read = emu10k1_audio_read,
diff --git a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c
index cca3dad2bdf4..df1e990449a0 100644
--- a/sound/oss/emu10k1/midi.c
+++ b/sound/oss/emu10k1/midi.c
@@ -458,7 +458,7 @@ int emu10k1_midi_callback(unsigned long msg, unsigned long refdata, unsigned lon
458} 458}
459 459
460/* MIDI file operations */ 460/* MIDI file operations */
461struct file_operations emu10k1_midi_fops = { 461const struct file_operations emu10k1_midi_fops = {
462 .owner = THIS_MODULE, 462 .owner = THIS_MODULE,
463 .read = emu10k1_midi_read, 463 .read = emu10k1_midi_read,
464 .write = emu10k1_midi_write, 464 .write = emu10k1_midi_write,
diff --git a/sound/oss/emu10k1/mixer.c b/sound/oss/emu10k1/mixer.c
index 6419796c2ed7..bc3805fb0701 100644
--- a/sound/oss/emu10k1/mixer.c
+++ b/sound/oss/emu10k1/mixer.c
@@ -681,7 +681,7 @@ static int emu10k1_mixer_release(struct inode *inode, struct file *file)
681 return 0; 681 return 0;
682} 682}
683 683
684struct file_operations emu10k1_mixer_fops = { 684const struct file_operations emu10k1_mixer_fops = {
685 .owner = THIS_MODULE, 685 .owner = THIS_MODULE,
686 .llseek = no_llseek, 686 .llseek = no_llseek,
687 .ioctl = emu10k1_mixer_ioctl, 687 .ioctl = emu10k1_mixer_ioctl,
diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c
index cc282a0cd539..e1fbcca8e722 100644
--- a/sound/oss/es1371.c
+++ b/sound/oss/es1371.c
@@ -131,6 +131,7 @@
131#include <linux/dma-mapping.h> 131#include <linux/dma-mapping.h>
132#include <linux/mutex.h> 132#include <linux/mutex.h>
133#include <linux/mm.h> 133#include <linux/mm.h>
134#include <linux/kernel.h>
134 135
135#include <asm/io.h> 136#include <asm/io.h>
136#include <asm/page.h> 137#include <asm/page.h>
@@ -2998,7 +2999,7 @@ static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_devic
2998 set_fs(KERNEL_DS); 2999 set_fs(KERNEL_DS);
2999 val = SOUND_MASK_LINE; 3000 val = SOUND_MASK_LINE;
3000 mixdev_ioctl(s->codec, SOUND_MIXER_WRITE_RECSRC, (unsigned long)&val); 3001 mixdev_ioctl(s->codec, SOUND_MIXER_WRITE_RECSRC, (unsigned long)&val);
3001 for (i = 0; i < sizeof(initvol)/sizeof(initvol[0]); i++) { 3002 for (i = 0; i < ARRAY_SIZE(initvol); i++) {
3002 val = initvol[i].vol; 3003 val = initvol[i].vol;
3003 mixdev_ioctl(s->codec, initvol[i].mixch, (unsigned long)&val); 3004 mixdev_ioctl(s->codec, initvol[i].mixch, (unsigned long)&val);
3004 } 3005 }
diff --git a/sound/oss/hal2.c b/sound/oss/hal2.c
index d18286ccc14d..80a42773c648 100644
--- a/sound/oss/hal2.c
+++ b/sound/oss/hal2.c
@@ -1377,7 +1377,7 @@ static int hal2_release(struct inode *inode, struct file *file)
1377 return 0; 1377 return 0;
1378} 1378}
1379 1379
1380static struct file_operations hal2_audio_fops = { 1380static const struct file_operations hal2_audio_fops = {
1381 .owner = THIS_MODULE, 1381 .owner = THIS_MODULE,
1382 .llseek = no_llseek, 1382 .llseek = no_llseek,
1383 .read = hal2_read, 1383 .read = hal2_read,
@@ -1388,7 +1388,7 @@ static struct file_operations hal2_audio_fops = {
1388 .release = hal2_release, 1388 .release = hal2_release,
1389}; 1389};
1390 1390
1391static struct file_operations hal2_mixer_fops = { 1391static const struct file_operations hal2_mixer_fops = {
1392 .owner = THIS_MODULE, 1392 .owner = THIS_MODULE,
1393 .llseek = no_llseek, 1393 .llseek = no_llseek,
1394 .ioctl = hal2_ioctl_mixdev, 1394 .ioctl = hal2_ioctl_mixdev,
diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c
index 24110d63b136..f1f49ebf752e 100644
--- a/sound/oss/msnd_pinnacle.c
+++ b/sound/oss/msnd_pinnacle.c
@@ -1106,7 +1106,7 @@ static irqreturn_t intr(int irq, void *dev_id)
1106 return IRQ_HANDLED; 1106 return IRQ_HANDLED;
1107} 1107}
1108 1108
1109static struct file_operations dev_fileops = { 1109static const struct file_operations dev_fileops = {
1110 .owner = THIS_MODULE, 1110 .owner = THIS_MODULE,
1111 .read = dev_read, 1111 .read = dev_read,
1112 .write = dev_write, 1112 .write = dev_write,
diff --git a/sound/oss/nec_vrc5477.c b/sound/oss/nec_vrc5477.c
index da9728e17727..d459bdb14154 100644
--- a/sound/oss/nec_vrc5477.c
+++ b/sound/oss/nec_vrc5477.c
@@ -1381,11 +1381,11 @@ static int vrc5477_ac97_ioctl(struct inode *inode, struct file *file,
1381 int val, ret; 1381 int val, ret;
1382 1382
1383#ifdef VRC5477_AC97_DEBUG 1383#ifdef VRC5477_AC97_DEBUG
1384 for (count=0; count<sizeof(ioctl_str)/sizeof(ioctl_str[0]); count++) { 1384 for (count = 0; count < ARRAY_SIZE(ioctl_str); count++) {
1385 if (ioctl_str[count].cmd == cmd) 1385 if (ioctl_str[count].cmd == cmd)
1386 break; 1386 break;
1387 } 1387 }
1388 if (count < sizeof(ioctl_str)/sizeof(ioctl_str[0])) 1388 if (count < ARRAY_SIZE(ioctl_str))
1389 printk(KERN_INFO PFX "ioctl %s\n", ioctl_str[count].str); 1389 printk(KERN_INFO PFX "ioctl %s\n", ioctl_str[count].str);
1390 else 1390 else
1391 printk(KERN_INFO PFX "ioctl unknown, 0x%x\n", cmd); 1391 printk(KERN_INFO PFX "ioctl unknown, 0x%x\n", cmd);
diff --git a/sound/oss/os.h b/sound/oss/os.h
index 0490562c7f7f..a1a962d7f67d 100644
--- a/sound/oss/os.h
+++ b/sound/oss/os.h
@@ -43,4 +43,4 @@ extern int sound_nblocks;
43#undef PSEUDO_DMA_AUTOINIT 43#undef PSEUDO_DMA_AUTOINIT
44#define ALLOW_BUFFER_MAPPING 44#define ALLOW_BUFFER_MAPPING
45 45
46extern struct file_operations oss_sound_fops; 46extern const struct file_operations oss_sound_fops;
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
index 51f554154c48..7ea9accc2ba4 100644
--- a/sound/oss/sh_dac_audio.c
+++ b/sound/oss/sh_dac_audio.c
@@ -255,7 +255,7 @@ static int dac_audio_release(struct inode *inode, struct file *file)
255 return 0; 255 return 0;
256} 256}
257 257
258struct file_operations dac_audio_fops = { 258const struct file_operations dac_audio_fops = {
259 .read = dac_audio_read, 259 .read = dac_audio_read,
260 .write = dac_audio_write, 260 .write = dac_audio_write,
261 .ioctl = dac_audio_ioctl, 261 .ioctl = dac_audio_ioctl,
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index a89108cb74ea..dcd8d6d2f56f 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -32,6 +32,7 @@
32#include <linux/ctype.h> 32#include <linux/ctype.h>
33#include <linux/stddef.h> 33#include <linux/stddef.h>
34#include <linux/kmod.h> 34#include <linux/kmod.h>
35#include <linux/kernel.h>
35#include <asm/dma.h> 36#include <asm/dma.h>
36#include <asm/io.h> 37#include <asm/io.h>
37#include <linux/wait.h> 38#include <linux/wait.h>
@@ -482,7 +483,7 @@ static int sound_mmap(struct file *file, struct vm_area_struct *vma)
482 return 0; 483 return 0;
483} 484}
484 485
485struct file_operations oss_sound_fops = { 486const struct file_operations oss_sound_fops = {
486 .owner = THIS_MODULE, 487 .owner = THIS_MODULE,
487 .llseek = no_llseek, 488 .llseek = no_llseek,
488 .read = sound_read, 489 .read = sound_read,
@@ -557,7 +558,7 @@ static int __init oss_init(void)
557 /* Protecting the innocent */ 558 /* Protecting the innocent */
558 sound_dmap_flag = (dmabuf > 0 ? 1 : 0); 559 sound_dmap_flag = (dmabuf > 0 ? 1 : 0);
559 560
560 for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { 561 for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
561 device_create(sound_class, NULL, 562 device_create(sound_class, NULL,
562 MKDEV(SOUND_MAJOR, dev_list[i].minor), 563 MKDEV(SOUND_MAJOR, dev_list[i].minor),
563 "%s", dev_list[i].name); 564 "%s", dev_list[i].name);
@@ -581,7 +582,7 @@ static void __exit oss_cleanup(void)
581{ 582{
582 int i, j; 583 int i, j;
583 584
584 for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { 585 for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
585 device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor)); 586 device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor));
586 if (!dev_list[i].num) 587 if (!dev_list[i].num)
587 continue; 588 continue;
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c
index 471c274c5000..9f7e5f59ac82 100644
--- a/sound/oss/swarm_cs4297a.c
+++ b/sound/oss/swarm_cs4297a.c
@@ -77,6 +77,7 @@
77#include <linux/poll.h> 77#include <linux/poll.h>
78#include <linux/smp_lock.h> 78#include <linux/smp_lock.h>
79#include <linux/mutex.h> 79#include <linux/mutex.h>
80#include <linux/kernel.h>
80 81
81#include <asm/byteorder.h> 82#include <asm/byteorder.h>
82#include <asm/dma.h> 83#include <asm/dma.h>
@@ -2676,7 +2677,7 @@ static int __init cs4297a_init(void)
2676#if 0 2677#if 0
2677 val = SOUND_MASK_LINE; 2678 val = SOUND_MASK_LINE;
2678 mixer_ioctl(s, SOUND_MIXER_WRITE_RECSRC, (unsigned long) &val); 2679 mixer_ioctl(s, SOUND_MIXER_WRITE_RECSRC, (unsigned long) &val);
2679 for (i = 0; i < sizeof(initvol) / sizeof(initvol[0]); i++) { 2680 for (i = 0; i < ARRAY_SIZE(initvol); i++) {
2680 val = initvol[i].vol; 2681 val = initvol[i].vol;
2681 mixer_ioctl(s, initvol[i].mixch, (unsigned long) &val); 2682 mixer_ioctl(s, initvol[i].mixch, (unsigned long) &val);
2682 } 2683 }
diff --git a/sound/oss/via82cxxx_audio.c b/sound/oss/via82cxxx_audio.c
index c96cc8c68b3b..7ab3a732e184 100644
--- a/sound/oss/via82cxxx_audio.c
+++ b/sound/oss/via82cxxx_audio.c
@@ -1619,7 +1619,7 @@ out:
1619} 1619}
1620 1620
1621 1621
1622static struct file_operations via_mixer_fops = { 1622static const struct file_operations via_mixer_fops = {
1623 .owner = THIS_MODULE, 1623 .owner = THIS_MODULE,
1624 .open = via_mixer_open, 1624 .open = via_mixer_open,
1625 .llseek = no_llseek, 1625 .llseek = no_llseek,
@@ -2042,7 +2042,7 @@ static int via_interrupt_init (struct via_info *card)
2042 * 2042 *
2043 */ 2043 */
2044 2044
2045static struct file_operations via_dsp_fops = { 2045static const struct file_operations via_dsp_fops = {
2046 .owner = THIS_MODULE, 2046 .owner = THIS_MODULE,
2047 .open = via_dsp_open, 2047 .open = via_dsp_open,
2048 .release = via_dsp_release, 2048 .release = via_dsp_release,
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c
index 6dfb9f4b03ec..d25249a932bf 100644
--- a/sound/oss/vwsnd.c
+++ b/sound/oss/vwsnd.c
@@ -3035,7 +3035,7 @@ static int vwsnd_audio_release(struct inode *inode, struct file *file)
3035 return err; 3035 return err;
3036} 3036}
3037 3037
3038static struct file_operations vwsnd_audio_fops = { 3038static const struct file_operations vwsnd_audio_fops = {
3039 .owner = THIS_MODULE, 3039 .owner = THIS_MODULE,
3040 .llseek = no_llseek, 3040 .llseek = no_llseek,
3041 .read = vwsnd_audio_read, 3041 .read = vwsnd_audio_read,
@@ -3225,7 +3225,7 @@ static int vwsnd_mixer_ioctl(struct inode *ioctl,
3225 return retval; 3225 return retval;
3226} 3226}
3227 3227
3228static struct file_operations vwsnd_mixer_fops = { 3228static const struct file_operations vwsnd_mixer_fops = {
3229 .owner = THIS_MODULE, 3229 .owner = THIS_MODULE,
3230 .llseek = no_llseek, 3230 .llseek = no_llseek,
3231 .ioctl = vwsnd_mixer_ioctl, 3231 .ioctl = vwsnd_mixer_ioctl,