diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-12 13:53:18 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-12 16:36:47 -0400 |
commit | d209974cdc36aeeef406fa2019e9e1dacecbb979 (patch) | |
tree | eb028490375c6651cebe1e054bb2efdb5ceb787a /sound/oss/msnd_pinnacle.c | |
parent | 90dc763fef4c869e60b2a7ad92e1a7dab68575ea (diff) |
sound/oss: convert to unlocked_ioctl
These are the final conversions for the ioctl file operation so we can remove
it in the next merge window.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/oss/msnd_pinnacle.c')
-rw-r--r-- | sound/oss/msnd_pinnacle.c | 15 |
1 files changed, 10 insertions, 5 deletions
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 | }; |