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/sh_dac_audio.c | |
parent | 90dc763fef4c869e60b2a7ad92e1a7dab68575ea (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/sh_dac_audio.c')
-rw-r--r-- | sound/oss/sh_dac_audio.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c index 8f0be4053a5a..fdb58eb83d4e 100644 --- a/sound/oss/sh_dac_audio.c +++ b/sound/oss/sh_dac_audio.c @@ -15,6 +15,7 @@ #include <linux/linkage.h> #include <linux/slab.h> #include <linux/fs.h> +#include <linux/smp_lock.h> #include <linux/sound.h> #include <linux/smp_lock.h> #include <linux/soundcard.h> @@ -93,7 +94,7 @@ static void dac_audio_set_rate(void) wakeups_per_second = ktime_set(0, 1000000000 / rate); } -static int dac_audio_ioctl(struct inode *inode, struct file *file, +static int dac_audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int val; @@ -159,6 +160,17 @@ static int dac_audio_ioctl(struct inode *inode, struct file *file, return -EINVAL; } +static long dac_audio_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) +{ + int ret; + + lock_kernel(); + ret = dac_audio_ioctl(file, cmd, arg); + unlock_kernel(); + + return ret; +} + static ssize_t dac_audio_write(struct file *file, const char *buf, size_t count, loff_t * ppos) { @@ -242,8 +254,8 @@ static int dac_audio_release(struct inode *inode, struct file *file) const struct file_operations dac_audio_fops = { .read = dac_audio_read, - .write = dac_audio_write, - .ioctl = dac_audio_ioctl, + .write = dac_audio_write, + .unlocked_ioctl = dac_audio_unlocked_ioctl, .open = dac_audio_open, .release = dac_audio_release, }; |