module_param: avoid bool abuse, add bint for special cases.
For historical reasons, we allow module_param(bool) to take an int (or an unsigned int). That's going away. A few drivers really want an int: they set it to -1 and a parameter will set it to 0 or 1. This sucks: reading them from sysfs will give 'Y' for both -1 and 1, but if we change it to an int, then the users might be broken (if they did "param" instead of "param=1"). Use a new 'bint' parser for them. (ntfs has a different problem: it needs an int for debug_msgs because it's also exposed via sysctl.) Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Cc: Christoph Raisch <raisch@de.ibm.com> Cc: Roland Dreier <roland@kernel.org> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: linux390@de.ibm.com Cc: Anton Altaparmakov <anton@tuxera.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: lm-sensors@lm-sensors.org Cc: linux-rdma@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linux-ntfs-dev@lists.sourceforge.net Cc: alsa-devel@alsa-project.org Acked-by: Takashi Iwai <tiwai@suse.de> (For the sound part) Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> (For the hwmon driver) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -95,13 +95,13 @@ module_param(ac97_quirk, charp, 0444);
|
||||
MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
|
||||
module_param(buggy_semaphore, bool, 0444);
|
||||
MODULE_PARM_DESC(buggy_semaphore, "Enable workaround for hardwares with problematic codec semaphores.");
|
||||
module_param(buggy_irq, bool, 0444);
|
||||
module_param(buggy_irq, bint, 0444);
|
||||
MODULE_PARM_DESC(buggy_irq, "Enable workaround for buggy interrupts on some motherboards.");
|
||||
module_param(xbox, bool, 0444);
|
||||
MODULE_PARM_DESC(xbox, "Set to 1 for Xbox, if you have problems with the AC'97 codec detection.");
|
||||
module_param(spdif_aclink, int, 0444);
|
||||
MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link.");
|
||||
module_param(inside_vm, bool, 0444);
|
||||
module_param(inside_vm, bint, 0444);
|
||||
MODULE_PARM_DESC(inside_vm, "KVM/Parallels optimization.");
|
||||
|
||||
/* just for backward compatibility */
|
||||
|
Reference in New Issue
Block a user