aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/vwsnd.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-07-12 13:53:18 -0400
committerTakashi Iwai <tiwai@suse.de>2010-07-12 16:36:47 -0400
commitd209974cdc36aeeef406fa2019e9e1dacecbb979 (patch)
treeeb028490375c6651cebe1e054bb2efdb5ceb787a /sound/oss/vwsnd.c
parent90dc763fef4c869e60b2a7ad92e1a7dab68575ea (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/vwsnd.c')
-rw-r--r--sound/oss/vwsnd.c24
1 files changed, 13 insertions, 11 deletions
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
2432static int vwsnd_audio_do_ioctl(struct inode *inode, 2432static 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
2888static int vwsnd_audio_ioctl(struct inode *inode, 2887static 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
3214static int vwsnd_mixer_ioctl(struct inode *ioctl, 3215static 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
3239static const struct file_operations vwsnd_mixer_fops = { 3241static 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};