aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/swarm_cs4297a.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/swarm_cs4297a.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/swarm_cs4297a.c')
-rw-r--r--sound/oss/swarm_cs4297a.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c
index 34b0838793a6..b15840ad2527 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)
1571} 1571}
1572 1572
1573 1573
1574static int cs4297a_ioctl_mixdev(struct inode *inode, struct file *file, 1574static int cs4297a_ioctl_mixdev(struct file *file,
1575 unsigned int cmd, unsigned long arg) 1575 unsigned int cmd, unsigned long arg)
1576{ 1576{
1577 return mixer_ioctl((struct cs4297a_state *) file->private_data, cmd, 1577 int ret;
1578 lock_kernel();
1579 ret = mixer_ioctl((struct cs4297a_state *) file->private_data, cmd,
1578 arg); 1580 arg);
1581 unlock_kernel();
1582 return ret;
1579} 1583}
1580 1584
1581 1585
@@ -1585,7 +1589,7 @@ static int cs4297a_ioctl_mixdev(struct inode *inode, struct file *file,
1585static const struct file_operations cs4297a_mixer_fops = { 1589static const struct file_operations cs4297a_mixer_fops = {
1586 .owner = THIS_MODULE, 1590 .owner = THIS_MODULE,
1587 .llseek = no_llseek, 1591 .llseek = no_llseek,
1588 .ioctl = cs4297a_ioctl_mixdev, 1592 .unlocked_ioctl = cs4297a_ioctl_mixdev,
1589 .open = cs4297a_open_mixdev, 1593 .open = cs4297a_open_mixdev,
1590 .release = cs4297a_release_mixdev, 1594 .release = cs4297a_release_mixdev,
1591}; 1595};
@@ -1949,7 +1953,7 @@ static int cs4297a_mmap(struct file *file, struct vm_area_struct *vma)
1949} 1953}
1950 1954
1951 1955
1952static int cs4297a_ioctl(struct inode *inode, struct file *file, 1956static int cs4297a_ioctl(struct file *file,
1953 unsigned int cmd, unsigned long arg) 1957 unsigned int cmd, unsigned long arg)
1954{ 1958{
1955 struct cs4297a_state *s = 1959 struct cs4297a_state *s =
@@ -2342,6 +2346,16 @@ static int cs4297a_ioctl(struct inode *inode, struct file *file,
2342 return mixer_ioctl(s, cmd, arg); 2346 return mixer_ioctl(s, cmd, arg);
2343} 2347}
2344 2348
2349static long cs4297a_unlocked_ioctl(struct file *file, u_int cmd, u_long arg)
2350{
2351 int ret;
2352
2353 lock_kernel();
2354 ret = cs4297a_ioctl(file, cmd, arg);
2355 unlock_kernel();
2356
2357 return ret;
2358}
2345 2359
2346static int cs4297a_release(struct inode *inode, struct file *file) 2360static int cs4297a_release(struct inode *inode, struct file *file)
2347{ 2361{
@@ -2511,7 +2525,7 @@ static const struct file_operations cs4297a_audio_fops = {
2511 .read = cs4297a_read, 2525 .read = cs4297a_read,
2512 .write = cs4297a_write, 2526 .write = cs4297a_write,
2513 .poll = cs4297a_poll, 2527 .poll = cs4297a_poll,
2514 .ioctl = cs4297a_ioctl, 2528 .unlocked_ioctl = cs4297a_unlocked_ioctl,
2515 .mmap = cs4297a_mmap, 2529 .mmap = cs4297a_mmap,
2516 .open = cs4297a_open, 2530 .open = cs4297a_open,
2517 .release = cs4297a_release, 2531 .release = cs4297a_release,