mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
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 <[email protected]> Cc: Jean Delvare <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Hoang-Nam Nguyen <[email protected]> Cc: Christoph Raisch <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Sean Hefty <[email protected]> Cc: Hal Rosenstock <[email protected]> Cc: [email protected] Cc: Anton Altaparmakov <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Takashi Iwai <[email protected]> (For the sound part) Acked-by: Guenter Roeck <[email protected]> (For the hwmon driver) Signed-off-by: Rusty Russell <[email protected]>
This commit is contained in:
parent
bafeafeab9
commit
69116f279a
7 changed files with 36 additions and 6 deletions
|
|
@ -55,7 +55,7 @@ static const u8 REG_TEMP_MAX[4] = { 0x34, 0x30, 0x31, 0x32 };
|
|||
* it. Default is to leave the device in the state it's already in (-1).
|
||||
* This parameter allows APD mode to be optionally forced on or off */
|
||||
static int apd = -1;
|
||||
module_param(apd, bool, 0);
|
||||
module_param(apd, bint, 0);
|
||||
MODULE_PARM_DESC(init, "Set to zero to disable anti-parallel diode mode");
|
||||
|
||||
struct temperature {
|
||||
|
|
|
|||
Loading…
Reference in a new issue