diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-12 19:53:18 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-12 22:36:47 +0200 |
commit | d209974cdc36aeeef406fa2019e9e1dacecbb979 (patch) | |
tree | eb028490375c6651cebe1e054bb2efdb5ceb787a /sound/oss/msnd_pinnacle.c | |
parent | 90dc763fef4c869e60b2a7ad92e1a7dab68575ea (diff) | |
download | op-kernel-dev-d209974cdc36aeeef406fa2019e9e1dacecbb979.zip op-kernel-dev-d209974cdc36aeeef406fa2019e9e1dacecbb979.tar.gz |
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 153d822..9ffd29f 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) return -EINVAL; } -static int dev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +static long dev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int minor = iminor(inode); + int ret; if (cmd == OSS_GETVERSION) { int sound_version = SOUND_VERSION; return put_user(sound_version, (int __user *)arg); } + ret = -EINVAL; + + lock_kernel(); if (minor == dev.dsp_minor) - return dsp_ioctl(file, cmd, arg); + ret = dsp_ioctl(file, cmd, arg); else if (minor == dev.mixer_minor) - return mixer_ioctl(cmd, arg); + ret = mixer_ioctl(cmd, arg); + unlock_kernel(); - return -EINVAL; + return ret; } static void dsp_write_flush(void) @@ -1109,7 +1114,7 @@ static const struct file_operations dev_fileops = { .owner = THIS_MODULE, .read = dev_read, .write = dev_write, - .ioctl = dev_ioctl, + .unlocked_ioctl = dev_ioctl, .open = dev_open, .release = dev_release, }; |