diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-12-19 09:08:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-19 22:27:29 -0500 |
commit | eb93992207dadb946a3b5cf4544957dc924a6f58 (patch) | |
tree | 8d840ea0e0e5eb3cf6207a2608d434475a9076b4 /drivers/net/wireless | |
parent | 3db1cd5c05f35fb43eb134df6f321de4e63141f2 (diff) |
module_param: make bool parameters really bool (net & drivers/net)
module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.
It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.
(Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false).
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ath5k.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/p54/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/wifi.h | 2 |
13 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index e564e585b221..c2b2518c2ecd 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h | |||
@@ -914,7 +914,7 @@ enum ath5k_dmasize { | |||
914 | */ | 914 | */ |
915 | 915 | ||
916 | #define AR5K_KEYCACHE_SIZE 8 | 916 | #define AR5K_KEYCACHE_SIZE 8 |
917 | extern int ath5k_modparam_nohwcrypt; | 917 | extern bool ath5k_modparam_nohwcrypt; |
918 | 918 | ||
919 | /***********************\ | 919 | /***********************\ |
920 | HW RELATED DEFINITIONS | 920 | HW RELATED DEFINITIONS |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 178a4dd10316..d366dadcf86e 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -68,15 +68,15 @@ | |||
68 | #define CREATE_TRACE_POINTS | 68 | #define CREATE_TRACE_POINTS |
69 | #include "trace.h" | 69 | #include "trace.h" |
70 | 70 | ||
71 | int ath5k_modparam_nohwcrypt; | 71 | bool ath5k_modparam_nohwcrypt; |
72 | module_param_named(nohwcrypt, ath5k_modparam_nohwcrypt, bool, S_IRUGO); | 72 | module_param_named(nohwcrypt, ath5k_modparam_nohwcrypt, bool, S_IRUGO); |
73 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); | 73 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); |
74 | 74 | ||
75 | static int modparam_all_channels; | 75 | static bool modparam_all_channels; |
76 | module_param_named(all_channels, modparam_all_channels, bool, S_IRUGO); | 76 | module_param_named(all_channels, modparam_all_channels, bool, S_IRUGO); |
77 | MODULE_PARM_DESC(all_channels, "Expose all channels the device can use."); | 77 | MODULE_PARM_DESC(all_channels, "Expose all channels the device can use."); |
78 | 78 | ||
79 | static int modparam_fastchanswitch; | 79 | static bool modparam_fastchanswitch; |
80 | module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO); | 80 | module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO); |
81 | MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios."); | 81 | MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios."); |
82 | 82 | ||
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c index 551859214ee9..db774212161b 100644 --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #include "carl9170.h" | 48 | #include "carl9170.h" |
49 | #include "cmd.h" | 49 | #include "cmd.h" |
50 | 50 | ||
51 | static int modparam_nohwcrypt; | 51 | static bool modparam_nohwcrypt; |
52 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); | 52 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); |
53 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware crypto offload."); | 53 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware crypto offload."); |
54 | 54 | ||
diff --git a/drivers/net/wireless/iwmc3200wifi/main.c b/drivers/net/wireless/iwmc3200wifi/main.c index c3a1b5deb0d1..1f868b166d10 100644 --- a/drivers/net/wireless/iwmc3200wifi/main.c +++ b/drivers/net/wireless/iwmc3200wifi/main.c | |||
@@ -91,11 +91,11 @@ static struct iwm_conf def_iwm_conf = { | |||
91 | .mac_addr = {0x00, 0x02, 0xb3, 0x01, 0x02, 0x03}, | 91 | .mac_addr = {0x00, 0x02, 0xb3, 0x01, 0x02, 0x03}, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static int modparam_reset; | 94 | static bool modparam_reset; |
95 | module_param_named(reset, modparam_reset, bool, 0644); | 95 | module_param_named(reset, modparam_reset, bool, 0644); |
96 | MODULE_PARM_DESC(reset, "reset on firmware errors (default 0 [not reset])"); | 96 | MODULE_PARM_DESC(reset, "reset on firmware errors (default 0 [not reset])"); |
97 | 97 | ||
98 | static int modparam_wimax_enable = 1; | 98 | static bool modparam_wimax_enable = true; |
99 | module_param_named(wimax_enable, modparam_wimax_enable, bool, 0644); | 99 | module_param_named(wimax_enable, modparam_wimax_enable, bool, 0644); |
100 | MODULE_PARM_DESC(wimax_enable, "Enable wimax core (default 1 [wimax enabled])"); | 100 | MODULE_PARM_DESC(wimax_enable, "Enable wimax core (default 1 [wimax enabled])"); |
101 | 101 | ||
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index a53fbfe4c286..e75d5c8d62cc 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #define MWL8K_VERSION "0.12" | 31 | #define MWL8K_VERSION "0.12" |
32 | 32 | ||
33 | /* Module parameters */ | 33 | /* Module parameters */ |
34 | static unsigned ap_mode_default; | 34 | static bool ap_mode_default; |
35 | module_param(ap_mode_default, bool, 0); | 35 | module_param(ap_mode_default, bool, 0); |
36 | MODULE_PARM_DESC(ap_mode_default, | 36 | MODULE_PARM_DESC(ap_mode_default, |
37 | "Set to 1 to make ap mode the default instead of sta mode"); | 37 | "Set to 1 to make ap mode the default instead of sta mode"); |
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index b52acc4b4086..9fb77d0319f5 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
@@ -121,7 +121,7 @@ module_param(orinoco_debug, int, 0644); | |||
121 | MODULE_PARM_DESC(orinoco_debug, "Debug level"); | 121 | MODULE_PARM_DESC(orinoco_debug, "Debug level"); |
122 | #endif | 122 | #endif |
123 | 123 | ||
124 | static int suppress_linkstatus; /* = 0 */ | 124 | static bool suppress_linkstatus; /* = 0 */ |
125 | module_param(suppress_linkstatus, bool, 0644); | 125 | module_param(suppress_linkstatus, bool, 0644); |
126 | MODULE_PARM_DESC(suppress_linkstatus, "Don't log link status changes"); | 126 | MODULE_PARM_DESC(suppress_linkstatus, "Don't log link status changes"); |
127 | 127 | ||
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c index db4d9a02f264..af2ca1a9c7d3 100644 --- a/drivers/net/wireless/p54/main.c +++ b/drivers/net/wireless/p54/main.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "p54.h" | 27 | #include "p54.h" |
28 | #include "lmac.h" | 28 | #include "lmac.h" |
29 | 29 | ||
30 | static int modparam_nohwcrypt; | 30 | static bool modparam_nohwcrypt; |
31 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); | 31 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); |
32 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); | 32 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); |
33 | MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>"); | 33 | MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>"); |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 53c5f878f61d..de7d41f21a69 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -39,7 +39,7 @@ | |||
39 | /* | 39 | /* |
40 | * Allow hardware encryption to be disabled. | 40 | * Allow hardware encryption to be disabled. |
41 | */ | 41 | */ |
42 | static int modparam_nohwcrypt; | 42 | static bool modparam_nohwcrypt; |
43 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); | 43 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); |
44 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); | 44 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); |
45 | 45 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index da48c8ac27bd..4941a1a23219 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -50,7 +50,7 @@ | |||
50 | /* | 50 | /* |
51 | * Allow hardware encryption to be disabled. | 51 | * Allow hardware encryption to be disabled. |
52 | */ | 52 | */ |
53 | static int modparam_nohwcrypt = 0; | 53 | static bool modparam_nohwcrypt = false; |
54 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); | 54 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); |
55 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); | 55 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); |
56 | 56 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 377876315b8d..b1df1a774948 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -45,7 +45,7 @@ | |||
45 | /* | 45 | /* |
46 | * Allow hardware encryption to be disabled. | 46 | * Allow hardware encryption to be disabled. |
47 | */ | 47 | */ |
48 | static int modparam_nohwcrypt; | 48 | static bool modparam_nohwcrypt; |
49 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); | 49 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); |
50 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); | 50 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); |
51 | 51 | ||
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index bf55b4a311e3..e0c6d117429d 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -41,7 +41,7 @@ | |||
41 | /* | 41 | /* |
42 | * Allow hardware encryption to be disabled. | 42 | * Allow hardware encryption to be disabled. |
43 | */ | 43 | */ |
44 | static int modparam_nohwcrypt = 0; | 44 | static bool modparam_nohwcrypt = false; |
45 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); | 45 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); |
46 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); | 46 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); |
47 | 47 | ||
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index cfb19dbb0a67..1c69c737086d 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -40,7 +40,7 @@ | |||
40 | /* | 40 | /* |
41 | * Allow hardware encryption to be disabled. | 41 | * Allow hardware encryption to be disabled. |
42 | */ | 42 | */ |
43 | static int modparam_nohwcrypt; | 43 | static bool modparam_nohwcrypt; |
44 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); | 44 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); |
45 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); | 45 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); |
46 | 46 | ||
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h index 085dccdbd1b6..9b7d60c0bf80 100644 --- a/drivers/net/wireless/rtlwifi/wifi.h +++ b/drivers/net/wireless/rtlwifi/wifi.h | |||
@@ -1488,7 +1488,7 @@ struct rtl_intf_ops { | |||
1488 | 1488 | ||
1489 | struct rtl_mod_params { | 1489 | struct rtl_mod_params { |
1490 | /* default: 0 = using hardware encryption */ | 1490 | /* default: 0 = using hardware encryption */ |
1491 | int sw_crypto; | 1491 | bool sw_crypto; |
1492 | 1492 | ||
1493 | /* default: 0 = DBG_EMERG (0)*/ | 1493 | /* default: 0 = DBG_EMERG (0)*/ |
1494 | int debug; | 1494 | int debug; |