mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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. ...
This commit is contained in:
commit
26df0766a7
30 changed files with 658 additions and 253 deletions
|
|
@ -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);
|
||||
|
|
@ -199,9 +201,11 @@ static int hostaudio_open(struct inode *inode, struct file *file)
|
|||
if (file->f_mode & FMODE_WRITE)
|
||||
w = 1;
|
||||
|
||||
kparam_block_sysfs_write(dsp);
|
||||
lock_kernel();
|
||||
ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0);
|
||||
unlock_kernel();
|
||||
kparam_unblock_sysfs_write(dsp);
|
||||
|
||||
if (ret < 0) {
|
||||
kfree(state);
|
||||
|
|
@ -258,13 +262,17 @@ static int hostmixer_open_mixdev(struct inode *inode, struct file *file)
|
|||
if (file->f_mode & FMODE_WRITE)
|
||||
w = 1;
|
||||
|
||||
kparam_block_sysfs_write(mixer);
|
||||
lock_kernel();
|
||||
ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0);
|
||||
unlock_kernel();
|
||||
kparam_unblock_sysfs_write(mixer);
|
||||
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue