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>
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 @@
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);
}
- if (minor == dev.dsp_minor)
- return dsp_ioctl(file, cmd, arg);
- else if (minor == dev.mixer_minor)
- return mixer_ioctl(cmd, arg);
+ ret = -EINVAL;
- return -EINVAL;
+ lock_kernel();
+ if (minor == dev.dsp_minor)
+ ret = dsp_ioctl(file, cmd, arg);
+ else if (minor == dev.mixer_minor)
+ ret = mixer_ioctl(cmd, arg);
+ unlock_kernel();
+
+ return ret;
}
static void dsp_write_flush(void)
@@ -1109,7 +1114,7 @@
.owner = THIS_MODULE,
.read = dev_read,
.write = dev_write,
- .ioctl = dev_ioctl,
+ .unlocked_ioctl = dev_ioctl,
.open = dev_open,
.release = dev_release,
};