aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 13:01:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 13:01:59 -0400
commit26df0766a73a859bb93dc58e747c5028557a23fd (patch)
tree4776de567425a7fb66ca9a87228309f9c84de633 /arch/um
parent580287628cdd99366b10c9050c4479b387283be8 (diff)
parenta6de51b2787012ba3ab62c7d50df1b749b83d5f0 (diff)
Merge branch 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (22 commits) param: don't deref arg in __same_type() checks param: update drivers/acpi/debug.c to new scheme param: use module_param in drivers/message/fusion/mptbase.c ide: use module_param_named rather than module_param_call param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes. param: lock myri10ge_fw_name against sysfs changes. param: simple locking for sysfs-writable charp parameters param: remove unnecessary writable charp param: add kerneldoc to moduleparam.h param: locking for kernel parameters param: make param sections const. param: use free hook for charp (fix leak of charp parameters) param: add a free hook to kernel_param_ops. param: silence .init.text references from param ops Add param ops struct for hvc_iucv driver. nfs: update for module_param_named API change AppArmor: update for module_param_named API change param: use ops in struct kernel_param, rather than get and set fns directly param: move the EXPORT_SYMBOL to after the definitions. ...
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/hostaudio_kern.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c
index 68142df76608..0c46e398cd8f 100644
--- a/arch/um/drivers/hostaudio_kern.c
+++ b/arch/um/drivers/hostaudio_kern.c
@@ -187,7 +187,9 @@ static int hostaudio_open(struct inode *inode, struct file *file)
187 int ret; 187 int ret;
188 188
189#ifdef DEBUG 189#ifdef DEBUG
190 kparam_block_sysfs_write(dsp);
190 printk(KERN_DEBUG "hostaudio: open called (host: %s)\n", dsp); 191 printk(KERN_DEBUG "hostaudio: open called (host: %s)\n", dsp);
192 kparam_unblock_sysfs_write(dsp);
191#endif 193#endif
192 194
193 state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL); 195 state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL);
@@ -199,9 +201,11 @@ static int hostaudio_open(struct inode *inode, struct file *file)
199 if (file->f_mode & FMODE_WRITE) 201 if (file->f_mode & FMODE_WRITE)
200 w = 1; 202 w = 1;
201 203
204 kparam_block_sysfs_write(dsp);
202 lock_kernel(); 205 lock_kernel();
203 ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); 206 ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0);
204 unlock_kernel(); 207 unlock_kernel();
208 kparam_unblock_sysfs_write(dsp);
205 209
206 if (ret < 0) { 210 if (ret < 0) {
207 kfree(state); 211 kfree(state);
@@ -258,13 +262,17 @@ static int hostmixer_open_mixdev(struct inode *inode, struct file *file)
258 if (file->f_mode & FMODE_WRITE) 262 if (file->f_mode & FMODE_WRITE)
259 w = 1; 263 w = 1;
260 264
265 kparam_block_sysfs_write(mixer);
261 lock_kernel(); 266 lock_kernel();
262 ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); 267 ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0);
263 unlock_kernel(); 268 unlock_kernel();
269 kparam_unblock_sysfs_write(mixer);
264 270
265 if (ret < 0) { 271 if (ret < 0) {
272 kparam_block_sysfs_write(dsp);
266 printk(KERN_ERR "hostaudio_open_mixdev failed to open '%s', " 273 printk(KERN_ERR "hostaudio_open_mixdev failed to open '%s', "
267 "err = %d\n", dsp, -ret); 274 "err = %d\n", dsp, -ret);
275 kparam_unblock_sysfs_write(dsp);
268 kfree(state); 276 kfree(state);
269 return ret; 277 return ret;
270 } 278 }
@@ -320,8 +328,10 @@ MODULE_LICENSE("GPL");
320 328
321static int __init hostaudio_init_module(void) 329static int __init hostaudio_init_module(void)
322{ 330{
331 __kernel_param_lock();
323 printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n", 332 printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n",
324 dsp, mixer); 333 dsp, mixer);
334 __kernel_param_unlock();
325 335
326 module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1); 336 module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1);
327 if (module_data.dev_audio < 0) { 337 if (module_data.dev_audio < 0) {