diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-08-07 13:40:07 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-08-07 13:40:14 +1000 |
commit | 2e1ae6421335138dff58e6ca8bb353748aa7c8b1 (patch) | |
tree | 09ccfddffb6c9d4ec7e6dd55ad168831aabd3864 /arch | |
parent | e1528ce0b236e15f71d79e053e736a1c131c3fb5 (diff) | |
parent | df736f6915a24373481fde09ede0b573348cddbf (diff) |
Merge branch 'quilt/rr'
Conflicts:
arch/um/drivers/hostaudio_kern.c
kernel/module.c
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/drivers/hostaudio_kern.c | 10 |
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..665d21fb5dd1 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) int ret; #ifdef DEBUG + kparam_block_sysfs_write(dsp); printk(KERN_DEBUG "hostaudio: open called (host: %s)\n", dsp); + kparam_unblock_sysfs_write(dsp); #endif state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL); @@ -200,7 +202,9 @@ static int hostaudio_open(struct inode *inode, struct file *file) w = 1; lock_kernel(); + kparam_block_sysfs_write(dsp); ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); + kparam_unblock_sysfs_write(dsp); unlock_kernel(); if (ret < 0) { @@ -259,12 +263,16 @@ static int hostmixer_open_mixdev(struct inode *inode, struct file *file) w = 1; lock_kernel(); + kparam_block_sysfs_write(mixer); ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); + kparam_unblock_sysfs_write(mixer); unlock_kernel(); if (ret < 0) { + kparam_block_sysfs_write(dsp); printk(KERN_ERR "hostaudio_open_mixdev failed to open '%s', " "err = %d\n", dsp, -ret); + kparam_unblock_sysfs_write(dsp); kfree(state); return ret; } @@ -320,8 +328,10 @@ MODULE_LICENSE("GPL"); static int __init hostaudio_init_module(void) { + __kernel_param_lock(); printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n", dsp, mixer); + __kernel_param_unlock(); module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1); if (module_data.dev_audio < 0) { |