diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-12 13:53:18 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-12 16:36:47 -0400 |
commit | d209974cdc36aeeef406fa2019e9e1dacecbb979 (patch) | |
tree | eb028490375c6651cebe1e054bb2efdb5ceb787a /sound/oss/dmasound | |
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/dmasound')
-rw-r--r-- | sound/oss/dmasound/dmasound_core.c | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index 5a4f38c0f480..6ecd41abb066 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c | |||
@@ -341,8 +341,8 @@ static int mixer_release(struct inode *inode, struct file *file) | |||
341 | unlock_kernel(); | 341 | unlock_kernel(); |
342 | return 0; | 342 | return 0; |
343 | } | 343 | } |
344 | static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd, | 344 | |
345 | u_long arg) | 345 | static int mixer_ioctl(struct file *file, u_int cmd, u_long arg) |
346 | { | 346 | { |
347 | if (_SIOC_DIR(cmd) & _SIOC_WRITE) | 347 | if (_SIOC_DIR(cmd) & _SIOC_WRITE) |
348 | mixer.modify_counter++; | 348 | mixer.modify_counter++; |
@@ -366,11 +366,22 @@ static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd, | |||
366 | return -EINVAL; | 366 | return -EINVAL; |
367 | } | 367 | } |
368 | 368 | ||
369 | static long mixer_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) | ||
370 | { | ||
371 | int ret; | ||
372 | |||
373 | lock_kernel(); | ||
374 | ret = mixer_ioctl(file, cmd, arg); | ||
375 | unlock_kernel(); | ||
376 | |||
377 | return ret; | ||
378 | } | ||
379 | |||
369 | static const struct file_operations mixer_fops = | 380 | static const struct file_operations mixer_fops = |
370 | { | 381 | { |
371 | .owner = THIS_MODULE, | 382 | .owner = THIS_MODULE, |
372 | .llseek = no_llseek, | 383 | .llseek = no_llseek, |
373 | .ioctl = mixer_ioctl, | 384 | .unlocked_ioctl = mixer_unlocked_ioctl, |
374 | .open = mixer_open, | 385 | .open = mixer_open, |
375 | .release = mixer_release, | 386 | .release = mixer_release, |
376 | }; | 387 | }; |
@@ -963,8 +974,7 @@ printk("dmasound_core: tried to set_queue_frags on a locked queue\n") ; | |||
963 | return 0 ; | 974 | return 0 ; |
964 | } | 975 | } |
965 | 976 | ||
966 | static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd, | 977 | static int sq_ioctl(struct file *file, u_int cmd, u_long arg) |
967 | u_long arg) | ||
968 | { | 978 | { |
969 | int val, result; | 979 | int val, result; |
970 | u_long fmt; | 980 | u_long fmt; |
@@ -1122,18 +1132,29 @@ static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd, | |||
1122 | return IOCTL_OUT(arg,val); | 1132 | return IOCTL_OUT(arg,val); |
1123 | 1133 | ||
1124 | default: | 1134 | default: |
1125 | return mixer_ioctl(inode, file, cmd, arg); | 1135 | return mixer_ioctl(file, cmd, arg); |
1126 | } | 1136 | } |
1127 | return -EINVAL; | 1137 | return -EINVAL; |
1128 | } | 1138 | } |
1129 | 1139 | ||
1140 | static long sq_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) | ||
1141 | { | ||
1142 | int ret; | ||
1143 | |||
1144 | lock_kernel(); | ||
1145 | ret = sq_ioctl(file, cmd, arg); | ||
1146 | unlock_kernel(); | ||
1147 | |||
1148 | return ret; | ||
1149 | } | ||
1150 | |||
1130 | static const struct file_operations sq_fops = | 1151 | static const struct file_operations sq_fops = |
1131 | { | 1152 | { |
1132 | .owner = THIS_MODULE, | 1153 | .owner = THIS_MODULE, |
1133 | .llseek = no_llseek, | 1154 | .llseek = no_llseek, |
1134 | .write = sq_write, | 1155 | .write = sq_write, |
1135 | .poll = sq_poll, | 1156 | .poll = sq_poll, |
1136 | .ioctl = sq_ioctl, | 1157 | .unlocked_ioctl = sq_unlocked_ioctl, |
1137 | .open = sq_open, | 1158 | .open = sq_open, |
1138 | .release = sq_release, | 1159 | .release = sq_release, |
1139 | }; | 1160 | }; |