diff options
| -rw-r--r-- | sound/oss/au1550_ac97.c | 54 | ||||
| -rw-r--r-- | sound/oss/dmasound/dmasound_core.c | 35 | ||||
| -rw-r--r-- | sound/oss/msnd_pinnacle.c | 15 | ||||
| -rw-r--r-- | sound/oss/sh_dac_audio.c | 18 | ||||
| -rw-r--r-- | sound/oss/swarm_cs4297a.c | 24 | ||||
| -rw-r--r-- | sound/oss/vwsnd.c | 24 |
6 files changed, 119 insertions, 51 deletions
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index fb913e568de1..0fd256ceea6b 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c | |||
| @@ -827,22 +827,26 @@ mixdev_ioctl(struct ac97_codec *codec, unsigned int cmd, | |||
| 827 | return codec->mixer_ioctl(codec, cmd, arg); | 827 | return codec->mixer_ioctl(codec, cmd, arg); |
| 828 | } | 828 | } |
| 829 | 829 | ||
| 830 | static int | 830 | static long |
| 831 | au1550_ioctl_mixdev(struct inode *inode, struct file *file, | 831 | au1550_ioctl_mixdev(struct file *file, unsigned int cmd, unsigned long arg) |
| 832 | unsigned int cmd, unsigned long arg) | ||
| 833 | { | 832 | { |
| 834 | struct au1550_state *s = (struct au1550_state *)file->private_data; | 833 | struct au1550_state *s = (struct au1550_state *)file->private_data; |
| 835 | struct ac97_codec *codec = s->codec; | 834 | struct ac97_codec *codec = s->codec; |
| 835 | int ret; | ||
| 836 | |||
| 837 | lock_kernel(); | ||
| 838 | ret = mixdev_ioctl(codec, cmd, arg); | ||
| 839 | unlock_kernel(); | ||
| 836 | 840 | ||
| 837 | return mixdev_ioctl(codec, cmd, arg); | 841 | return ret; |
| 838 | } | 842 | } |
| 839 | 843 | ||
| 840 | static /*const */ struct file_operations au1550_mixer_fops = { | 844 | static /*const */ struct file_operations au1550_mixer_fops = { |
| 841 | owner:THIS_MODULE, | 845 | .owner = THIS_MODULE, |
| 842 | llseek:au1550_llseek, | 846 | .llseek = au1550_llseek, |
| 843 | ioctl:au1550_ioctl_mixdev, | 847 | .unlocked_ioctl = au1550_ioctl_mixdev, |
| 844 | open:au1550_open_mixdev, | 848 | .open = au1550_open_mixdev, |
| 845 | release:au1550_release_mixdev, | 849 | .release = au1550_release_mixdev, |
| 846 | }; | 850 | }; |
| 847 | 851 | ||
| 848 | static int | 852 | static int |
| @@ -1346,8 +1350,7 @@ dma_count_done(struct dmabuf *db) | |||
| 1346 | 1350 | ||
| 1347 | 1351 | ||
| 1348 | static int | 1352 | static int |
| 1349 | au1550_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 1353 | au1550_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
| 1350 | unsigned long arg) | ||
| 1351 | { | 1354 | { |
| 1352 | struct au1550_state *s = (struct au1550_state *)file->private_data; | 1355 | struct au1550_state *s = (struct au1550_state *)file->private_data; |
| 1353 | unsigned long flags; | 1356 | unsigned long flags; |
| @@ -1783,6 +1786,17 @@ au1550_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
| 1783 | return mixdev_ioctl(s->codec, cmd, arg); | 1786 | return mixdev_ioctl(s->codec, cmd, arg); |
| 1784 | } | 1787 | } |
| 1785 | 1788 | ||
| 1789 | static long | ||
| 1790 | au1550_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | ||
| 1791 | { | ||
| 1792 | int ret; | ||
| 1793 | |||
| 1794 | lock_kernel(); | ||
| 1795 | ret = au1550_ioctl(file, cmd, arg); | ||
| 1796 | unlock_kernel(); | ||
| 1797 | |||
| 1798 | return ret; | ||
| 1799 | } | ||
| 1786 | 1800 | ||
| 1787 | static int | 1801 | static int |
| 1788 | au1550_open(struct inode *inode, struct file *file) | 1802 | au1550_open(struct inode *inode, struct file *file) |
| @@ -1893,15 +1907,15 @@ au1550_release(struct inode *inode, struct file *file) | |||
| 1893 | } | 1907 | } |
| 1894 | 1908 | ||
| 1895 | static /*const */ struct file_operations au1550_audio_fops = { | 1909 | static /*const */ struct file_operations au1550_audio_fops = { |
| 1896 | owner: THIS_MODULE, | 1910 | .owner = THIS_MODULE, |
| 1897 | llseek: au1550_llseek, | 1911 | .llseek = au1550_llseek, |
| 1898 | read: au1550_read, | 1912 | .read = au1550_read, |
| 1899 | write: au1550_write, | 1913 | .write = au1550_write, |
| 1900 | poll: au1550_poll, | 1914 | .poll = au1550_poll, |
| 1901 | ioctl: au1550_ioctl, | 1915 | .unlocked_ioctl = au1550_unlocked_ioctl, |
| 1902 | mmap: au1550_mmap, | 1916 | .mmap = au1550_mmap, |
| 1903 | open: au1550_open, | 1917 | .open = au1550_open, |
| 1904 | release: au1550_release, | 1918 | .release = au1550_release, |
| 1905 | }; | 1919 | }; |
| 1906 | 1920 | ||
| 1907 | MODULE_AUTHOR("Advanced Micro Devices (AMD), dan@embeddededge.com"); | 1921 | MODULE_AUTHOR("Advanced Micro Devices (AMD), dan@embeddededge.com"); |
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index 5a4f38c0f480..6ecd41abb066 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c | |||
| @@ -341,8 +341,8 @@ static int mixer_release(struct inode *inode, struct file *file) | |||
| 341 | unlock_kernel(); | 341 | unlock_kernel(); |
| 342 | return 0; | 342 | return 0; |
| 343 | } | 343 | } |
| 344 | static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd, | 344 | |
| 345 | u_long arg) | 345 | static int mixer_ioctl(struct file *file, u_int cmd, u_long arg) |
| 346 | { | 346 | { |
| 347 | if (_SIOC_DIR(cmd) & _SIOC_WRITE) | 347 | if (_SIOC_DIR(cmd) & _SIOC_WRITE) |
| 348 | mixer.modify_counter++; | 348 | mixer.modify_counter++; |
| @@ -366,11 +366,22 @@ static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd, | |||
| 366 | return -EINVAL; | 366 | return -EINVAL; |
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | static long mixer_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) | ||
| 370 | { | ||
| 371 | int ret; | ||
| 372 | |||
| 373 | lock_kernel(); | ||
| 374 | ret = mixer_ioctl(file, cmd, arg); | ||
| 375 | unlock_kernel(); | ||
| 376 | |||
| 377 | return ret; | ||
| 378 | } | ||
| 379 | |||
| 369 | static const struct file_operations mixer_fops = | 380 | static const struct file_operations mixer_fops = |
| 370 | { | 381 | { |
| 371 | .owner = THIS_MODULE, | 382 | .owner = THIS_MODULE, |
| 372 | .llseek = no_llseek, | 383 | .llseek = no_llseek, |
| 373 | .ioctl = mixer_ioctl, | 384 | .unlocked_ioctl = mixer_unlocked_ioctl, |
| 374 | .open = mixer_open, | 385 | .open = mixer_open, |
| 375 | .release = mixer_release, | 386 | .release = mixer_release, |
| 376 | }; | 387 | }; |
| @@ -963,8 +974,7 @@ printk("dmasound_core: tried to set_queue_frags on a locked queue\n") ; | |||
| 963 | return 0 ; | 974 | return 0 ; |
| 964 | } | 975 | } |
| 965 | 976 | ||
| 966 | static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd, | 977 | static int sq_ioctl(struct file *file, u_int cmd, u_long arg) |
| 967 | u_long arg) | ||
| 968 | { | 978 | { |
| 969 | int val, result; | 979 | int val, result; |
| 970 | u_long fmt; | 980 | u_long fmt; |
| @@ -1122,18 +1132,29 @@ static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd, | |||
| 1122 | return IOCTL_OUT(arg,val); | 1132 | return IOCTL_OUT(arg,val); |
| 1123 | 1133 | ||
| 1124 | default: | 1134 | default: |
| 1125 | return mixer_ioctl(inode, file, cmd, arg); | 1135 | return mixer_ioctl(file, cmd, arg); |
| 1126 | } | 1136 | } |
| 1127 | return -EINVAL; | 1137 | return -EINVAL; |
| 1128 | } | 1138 | } |
| 1129 | 1139 | ||
| 1140 | static long sq_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) | ||
| 1141 | { | ||
| 1142 | int ret; | ||
| 1143 | |||
| 1144 | lock_kernel(); | ||
| 1145 | ret = sq_ioctl(file, cmd, arg); | ||
| 1146 | unlock_kernel(); | ||
| 1147 | |||
| 1148 | return ret; | ||
| 1149 | } | ||
| 1150 | |||
| 1130 | static const struct file_operations sq_fops = | 1151 | static const struct file_operations sq_fops = |
| 1131 | { | 1152 | { |
| 1132 | .owner = THIS_MODULE, | 1153 | .owner = THIS_MODULE, |
| 1133 | .llseek = no_llseek, | 1154 | .llseek = no_llseek, |
| 1134 | .write = sq_write, | 1155 | .write = sq_write, |
| 1135 | .poll = sq_poll, | 1156 | .poll = sq_poll, |
| 1136 | .ioctl = sq_ioctl, | 1157 | .unlocked_ioctl = sq_unlocked_ioctl, |
| 1137 | .open = sq_open, | 1158 | .open = sq_open, |
| 1138 | .release = sq_release, | 1159 | .release = sq_release, |
| 1139 | }; | 1160 | }; |
diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c index 153d822bf9a3..9ffd29f32aa5 100644 --- a/sound/oss/msnd_pinnacle.c +++ b/sound/oss/msnd_pinnacle.c | |||
| @@ -639,21 +639,26 @@ static int mixer_ioctl(unsigned int cmd, unsigned long arg) | |||
| 639 | return -EINVAL; | 639 | return -EINVAL; |
| 640 | } | 640 | } |
| 641 | 641 | ||
| 642 | static int dev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) | 642 | static long dev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
| 643 | { | 643 | { |
| 644 | int minor = iminor(inode); | 644 | int minor = iminor(inode); |
| 645 | int ret; | ||
| 645 | 646 | ||
| 646 | if (cmd == OSS_GETVERSION) { | 647 | if (cmd == OSS_GETVERSION) { |
| 647 | int sound_version = SOUND_VERSION; | 648 | int sound_version = SOUND_VERSION; |
| 648 | return put_user(sound_version, (int __user *)arg); | 649 | return put_user(sound_version, (int __user *)arg); |
| 649 | } | 650 | } |
| 650 | 651 | ||
| 652 | ret = -EINVAL; | ||
| 653 | |||
| 654 | lock_kernel(); | ||
| 651 | if (minor == dev.dsp_minor) | 655 | if (minor == dev.dsp_minor) |
| 652 | return dsp_ioctl(file, cmd, arg); | 656 | ret = dsp_ioctl(file, cmd, arg); |
| 653 | else if (minor == dev.mixer_minor) | 657 | else if (minor == dev.mixer_minor) |
| 654 | return mixer_ioctl(cmd, arg); | 658 | ret = mixer_ioctl(cmd, arg); |
| 659 | unlock_kernel(); | ||
| 655 | 660 | ||
| 656 | return -EINVAL; | 661 | return ret; |
| 657 | } | 662 | } |
| 658 | 663 | ||
| 659 | static void dsp_write_flush(void) | 664 | static void dsp_write_flush(void) |
| @@ -1109,7 +1114,7 @@ static const struct file_operations dev_fileops = { | |||
| 1109 | .owner = THIS_MODULE, | 1114 | .owner = THIS_MODULE, |
| 1110 | .read = dev_read, | 1115 | .read = dev_read, |
| 1111 | .write = dev_write, | 1116 | .write = dev_write, |
| 1112 | .ioctl = dev_ioctl, | 1117 | .unlocked_ioctl = dev_ioctl, |
| 1113 | .open = dev_open, | 1118 | .open = dev_open, |
| 1114 | .release = dev_release, | 1119 | .release = dev_release, |
| 1115 | }; | 1120 | }; |
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c index 8f0be4053a5a..fdb58eb83d4e 100644 --- a/sound/oss/sh_dac_audio.c +++ b/sound/oss/sh_dac_audio.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
| 16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
| 17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
| 18 | #include <linux/smp_lock.h> | ||
| 18 | #include <linux/sound.h> | 19 | #include <linux/sound.h> |
| 19 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
| 20 | #include <linux/soundcard.h> | 21 | #include <linux/soundcard.h> |
| @@ -93,7 +94,7 @@ static void dac_audio_set_rate(void) | |||
| 93 | wakeups_per_second = ktime_set(0, 1000000000 / rate); | 94 | wakeups_per_second = ktime_set(0, 1000000000 / rate); |
| 94 | } | 95 | } |
| 95 | 96 | ||
| 96 | static int dac_audio_ioctl(struct inode *inode, struct file *file, | 97 | static int dac_audio_ioctl(struct file *file, |
| 97 | unsigned int cmd, unsigned long arg) | 98 | unsigned int cmd, unsigned long arg) |
| 98 | { | 99 | { |
| 99 | int val; | 100 | int val; |
| @@ -159,6 +160,17 @@ static int dac_audio_ioctl(struct inode *inode, struct file *file, | |||
| 159 | return -EINVAL; | 160 | return -EINVAL; |
| 160 | } | 161 | } |
| 161 | 162 | ||
| 163 | static long dac_audio_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) | ||
| 164 | { | ||
| 165 | int ret; | ||
| 166 | |||
| 167 | lock_kernel(); | ||
| 168 | ret = dac_audio_ioctl(file, cmd, arg); | ||
| 169 | unlock_kernel(); | ||
| 170 | |||
| 171 | return ret; | ||
| 172 | } | ||
| 173 | |||
| 162 | static ssize_t dac_audio_write(struct file *file, const char *buf, size_t count, | 174 | static ssize_t dac_audio_write(struct file *file, const char *buf, size_t count, |
| 163 | loff_t * ppos) | 175 | loff_t * ppos) |
| 164 | { | 176 | { |
| @@ -242,8 +254,8 @@ static int dac_audio_release(struct inode *inode, struct file *file) | |||
| 242 | 254 | ||
| 243 | const struct file_operations dac_audio_fops = { | 255 | const struct file_operations dac_audio_fops = { |
| 244 | .read = dac_audio_read, | 256 | .read = dac_audio_read, |
| 245 | .write = dac_audio_write, | 257 | .write = dac_audio_write, |
| 246 | .ioctl = dac_audio_ioctl, | 258 | .unlocked_ioctl = dac_audio_unlocked_ioctl, |
| 247 | .open = dac_audio_open, | 259 | .open = dac_audio_open, |
| 248 | .release = dac_audio_release, | 260 | .release = dac_audio_release, |
| 249 | }; | 261 | }; |
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c index 34b0838793a6..b15840ad2527 100644 --- a/sound/oss/swarm_cs4297a.c +++ b/sound/oss/swarm_cs4297a.c | |||
| @@ -1571,11 +1571,15 @@ static int cs4297a_release_mixdev(struct inode *inode, struct file *file) | |||
| 1571 | } | 1571 | } |
| 1572 | 1572 | ||
| 1573 | 1573 | ||
| 1574 | static int cs4297a_ioctl_mixdev(struct inode *inode, struct file *file, | 1574 | static int cs4297a_ioctl_mixdev(struct file *file, |
| 1575 | unsigned int cmd, unsigned long arg) | 1575 | unsigned int cmd, unsigned long arg) |
| 1576 | { | 1576 | { |
| 1577 | return mixer_ioctl((struct cs4297a_state *) file->private_data, cmd, | 1577 | int ret; |
| 1578 | lock_kernel(); | ||
| 1579 | ret = mixer_ioctl((struct cs4297a_state *) file->private_data, cmd, | ||
| 1578 | arg); | 1580 | arg); |
| 1581 | unlock_kernel(); | ||
| 1582 | return ret; | ||
| 1579 | } | 1583 | } |
| 1580 | 1584 | ||
| 1581 | 1585 | ||
| @@ -1585,7 +1589,7 @@ static int cs4297a_ioctl_mixdev(struct inode *inode, struct file *file, | |||
| 1585 | static const struct file_operations cs4297a_mixer_fops = { | 1589 | static const struct file_operations cs4297a_mixer_fops = { |
| 1586 | .owner = THIS_MODULE, | 1590 | .owner = THIS_MODULE, |
| 1587 | .llseek = no_llseek, | 1591 | .llseek = no_llseek, |
| 1588 | .ioctl = cs4297a_ioctl_mixdev, | 1592 | .unlocked_ioctl = cs4297a_ioctl_mixdev, |
| 1589 | .open = cs4297a_open_mixdev, | 1593 | .open = cs4297a_open_mixdev, |
| 1590 | .release = cs4297a_release_mixdev, | 1594 | .release = cs4297a_release_mixdev, |
| 1591 | }; | 1595 | }; |
| @@ -1949,7 +1953,7 @@ static int cs4297a_mmap(struct file *file, struct vm_area_struct *vma) | |||
| 1949 | } | 1953 | } |
| 1950 | 1954 | ||
| 1951 | 1955 | ||
| 1952 | static int cs4297a_ioctl(struct inode *inode, struct file *file, | 1956 | static int cs4297a_ioctl(struct file *file, |
| 1953 | unsigned int cmd, unsigned long arg) | 1957 | unsigned int cmd, unsigned long arg) |
| 1954 | { | 1958 | { |
| 1955 | struct cs4297a_state *s = | 1959 | struct cs4297a_state *s = |
| @@ -2342,6 +2346,16 @@ static int cs4297a_ioctl(struct inode *inode, struct file *file, | |||
| 2342 | return mixer_ioctl(s, cmd, arg); | 2346 | return mixer_ioctl(s, cmd, arg); |
| 2343 | } | 2347 | } |
| 2344 | 2348 | ||
| 2349 | static long cs4297a_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) | ||
| 2350 | { | ||
| 2351 | int ret; | ||
| 2352 | |||
| 2353 | lock_kernel(); | ||
| 2354 | ret = cs4297a_ioctl(file, cmd, arg); | ||
| 2355 | unlock_kernel(); | ||
| 2356 | |||
| 2357 | return ret; | ||
| 2358 | } | ||
| 2345 | 2359 | ||
| 2346 | static int cs4297a_release(struct inode *inode, struct file *file) | 2360 | static int cs4297a_release(struct inode *inode, struct file *file) |
| 2347 | { | 2361 | { |
| @@ -2511,7 +2525,7 @@ static const struct file_operations cs4297a_audio_fops = { | |||
| 2511 | .read = cs4297a_read, | 2525 | .read = cs4297a_read, |
| 2512 | .write = cs4297a_write, | 2526 | .write = cs4297a_write, |
| 2513 | .poll = cs4297a_poll, | 2527 | .poll = cs4297a_poll, |
| 2514 | .ioctl = cs4297a_ioctl, | 2528 | .unlocked_ioctl = cs4297a_unlocked_ioctl, |
| 2515 | .mmap = cs4297a_mmap, | 2529 | .mmap = cs4297a_mmap, |
| 2516 | .open = cs4297a_open, | 2530 | .open = cs4297a_open, |
| 2517 | .release = cs4297a_release, | 2531 | .release = cs4297a_release, |
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c index 99c94c48558c..8cd73cdd88af 100644 --- a/sound/oss/vwsnd.c +++ b/sound/oss/vwsnd.c | |||
| @@ -2429,8 +2429,7 @@ static unsigned int vwsnd_audio_poll(struct file *file, | |||
| 2429 | return mask; | 2429 | return mask; |
| 2430 | } | 2430 | } |
| 2431 | 2431 | ||
| 2432 | static int vwsnd_audio_do_ioctl(struct inode *inode, | 2432 | static int vwsnd_audio_do_ioctl(struct file *file, |
| 2433 | struct file *file, | ||
| 2434 | unsigned int cmd, | 2433 | unsigned int cmd, |
| 2435 | unsigned long arg) | 2434 | unsigned long arg) |
| 2436 | { | 2435 | { |
| @@ -2446,8 +2445,8 @@ static int vwsnd_audio_do_ioctl(struct inode *inode, | |||
| 2446 | int ival; | 2445 | int ival; |
| 2447 | 2446 | ||
| 2448 | 2447 | ||
| 2449 | DBGEV("(inode=0x%p, file=0x%p, cmd=0x%x, arg=0x%lx)\n", | 2448 | DBGEV("(file=0x%p, cmd=0x%x, arg=0x%lx)\n", |
| 2450 | inode, file, cmd, arg); | 2449 | file, cmd, arg); |
| 2451 | switch (cmd) { | 2450 | switch (cmd) { |
| 2452 | case OSS_GETVERSION: /* _SIOR ('M', 118, int) */ | 2451 | case OSS_GETVERSION: /* _SIOR ('M', 118, int) */ |
| 2453 | DBGX("OSS_GETVERSION\n"); | 2452 | DBGX("OSS_GETVERSION\n"); |
| @@ -2885,17 +2884,19 @@ static int vwsnd_audio_do_ioctl(struct inode *inode, | |||
| 2885 | return -EINVAL; | 2884 | return -EINVAL; |
| 2886 | } | 2885 | } |
| 2887 | 2886 | ||
| 2888 | static int vwsnd_audio_ioctl(struct inode *inode, | 2887 | static long vwsnd_audio_ioctl(struct file *file, |
| 2889 | struct file *file, | ||
| 2890 | unsigned int cmd, | 2888 | unsigned int cmd, |
| 2891 | unsigned long arg) | 2889 | unsigned long arg) |
| 2892 | { | 2890 | { |
| 2893 | vwsnd_dev_t *devc = (vwsnd_dev_t *) file->private_data; | 2891 | vwsnd_dev_t *devc = (vwsnd_dev_t *) file->private_data; |
| 2894 | int ret; | 2892 | int ret; |
| 2895 | 2893 | ||
| 2894 | lock_kernel(); | ||
| 2896 | mutex_lock(&devc->io_mutex); | 2895 | mutex_lock(&devc->io_mutex); |
| 2897 | ret = vwsnd_audio_do_ioctl(inode, file, cmd, arg); | 2896 | ret = vwsnd_audio_do_ioctl(file, cmd, arg); |
| 2898 | mutex_unlock(&devc->io_mutex); | 2897 | mutex_unlock(&devc->io_mutex); |
| 2898 | unlock_kernel(); | ||
| 2899 | |||
| 2899 | return ret; | 2900 | return ret; |
| 2900 | } | 2901 | } |
| 2901 | 2902 | ||
| @@ -3049,7 +3050,7 @@ static const struct file_operations vwsnd_audio_fops = { | |||
| 3049 | .read = vwsnd_audio_read, | 3050 | .read = vwsnd_audio_read, |
| 3050 | .write = vwsnd_audio_write, | 3051 | .write = vwsnd_audio_write, |
| 3051 | .poll = vwsnd_audio_poll, | 3052 | .poll = vwsnd_audio_poll, |
| 3052 | .ioctl = vwsnd_audio_ioctl, | 3053 | .unlocked_ioctl = vwsnd_audio_ioctl, |
| 3053 | .mmap = vwsnd_audio_mmap, | 3054 | .mmap = vwsnd_audio_mmap, |
| 3054 | .open = vwsnd_audio_open, | 3055 | .open = vwsnd_audio_open, |
| 3055 | .release = vwsnd_audio_release, | 3056 | .release = vwsnd_audio_release, |
| @@ -3211,8 +3212,7 @@ static int mixer_write_ioctl(vwsnd_dev_t *devc, unsigned int nr, void __user *ar | |||
| 3211 | 3212 | ||
| 3212 | /* This is the ioctl entry to the mixer driver. */ | 3213 | /* This is the ioctl entry to the mixer driver. */ |
| 3213 | 3214 | ||
| 3214 | static int vwsnd_mixer_ioctl(struct inode *ioctl, | 3215 | static long vwsnd_mixer_ioctl(struct file *file, |
| 3215 | struct file *file, | ||
| 3216 | unsigned int cmd, | 3216 | unsigned int cmd, |
| 3217 | unsigned long arg) | 3217 | unsigned long arg) |
| 3218 | { | 3218 | { |
| @@ -3223,6 +3223,7 @@ static int vwsnd_mixer_ioctl(struct inode *ioctl, | |||
| 3223 | 3223 | ||
| 3224 | DBGEV("(devc=0x%p, cmd=0x%x, arg=0x%lx)\n", devc, cmd, arg); | 3224 | DBGEV("(devc=0x%p, cmd=0x%x, arg=0x%lx)\n", devc, cmd, arg); |
| 3225 | 3225 | ||
| 3226 | lock_kernel(); | ||
| 3226 | mutex_lock(&devc->mix_mutex); | 3227 | mutex_lock(&devc->mix_mutex); |
| 3227 | { | 3228 | { |
| 3228 | if ((cmd & ~nrmask) == MIXER_READ(0)) | 3229 | if ((cmd & ~nrmask) == MIXER_READ(0)) |
| @@ -3233,13 +3234,14 @@ static int vwsnd_mixer_ioctl(struct inode *ioctl, | |||
| 3233 | retval = -EINVAL; | 3234 | retval = -EINVAL; |
| 3234 | } | 3235 | } |
| 3235 | mutex_unlock(&devc->mix_mutex); | 3236 | mutex_unlock(&devc->mix_mutex); |
| 3237 | unlock_kernel(); | ||
| 3236 | return retval; | 3238 | return retval; |
| 3237 | } | 3239 | } |
| 3238 | 3240 | ||
| 3239 | static const struct file_operations vwsnd_mixer_fops = { | 3241 | static const struct file_operations vwsnd_mixer_fops = { |
| 3240 | .owner = THIS_MODULE, | 3242 | .owner = THIS_MODULE, |
| 3241 | .llseek = no_llseek, | 3243 | .llseek = no_llseek, |
| 3242 | .ioctl = vwsnd_mixer_ioctl, | 3244 | .unlocked_ioctl = vwsnd_mixer_ioctl, |
| 3243 | .open = vwsnd_mixer_open, | 3245 | .open = vwsnd_mixer_open, |
| 3244 | .release = vwsnd_mixer_release, | 3246 | .release = vwsnd_mixer_release, |
| 3245 | }; | 3247 | }; |
