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/swarm_cs4297a.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/swarm_cs4297a.c')
-rw-r--r-- | sound/oss/swarm_cs4297a.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c index 34b0838..b15840a 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) } -static int cs4297a_ioctl_mixdev(struct inode *inode, struct file *file, +static int cs4297a_ioctl_mixdev(struct file *file, unsigned int cmd, unsigned long arg) { - return mixer_ioctl((struct cs4297a_state *) file->private_data, cmd, + int ret; + lock_kernel(); + ret = mixer_ioctl((struct cs4297a_state *) file->private_data, cmd, arg); + unlock_kernel(); + return ret; } @@ -1585,7 +1589,7 @@ static int cs4297a_ioctl_mixdev(struct inode *inode, struct file *file, static const struct file_operations cs4297a_mixer_fops = { .owner = THIS_MODULE, .llseek = no_llseek, - .ioctl = cs4297a_ioctl_mixdev, + .unlocked_ioctl = cs4297a_ioctl_mixdev, .open = cs4297a_open_mixdev, .release = cs4297a_release_mixdev, }; @@ -1949,7 +1953,7 @@ static int cs4297a_mmap(struct file *file, struct vm_area_struct *vma) } -static int cs4297a_ioctl(struct inode *inode, struct file *file, +static int cs4297a_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { struct cs4297a_state *s = @@ -2342,6 +2346,16 @@ static int cs4297a_ioctl(struct inode *inode, struct file *file, return mixer_ioctl(s, cmd, arg); } +static long cs4297a_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) +{ + int ret; + + lock_kernel(); + ret = cs4297a_ioctl(file, cmd, arg); + unlock_kernel(); + + return ret; +} static int cs4297a_release(struct inode *inode, struct file *file) { @@ -2511,7 +2525,7 @@ static const struct file_operations cs4297a_audio_fops = { .read = cs4297a_read, .write = cs4297a_write, .poll = cs4297a_poll, - .ioctl = cs4297a_ioctl, + .unlocked_ioctl = cs4297a_unlocked_ioctl, .mmap = cs4297a_mmap, .open = cs4297a_open, .release = cs4297a_release, |