diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-12-19 08:56:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-19 22:27:29 -0500 |
commit | 3db1cd5c05f35fb43eb134df6f321de4e63141f2 (patch) | |
tree | 960039f3f4f0a524b37e94434624da154859bc64 /net/rfkill | |
parent | a8e510f682fe6d7671c11887e07c55f86caaf3c1 (diff) |
net: fix assignment of 0/1 to bool variables.
DaveM said:
Please, this kind of stuff rots forever and not using bool properly
drives me crazy.
Joe Perches <joe@perches.com> gave me the spatch script:
@@
bool b;
@@
-b = 0
+b = false
@@
bool b;
@@
-b = 1
+b = true
I merely installed coccinelle, read the documentation and took credit.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rfkill')
-rw-r--r-- | net/rfkill/rfkill-regulator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rfkill/rfkill-regulator.c b/net/rfkill/rfkill-regulator.c index 2ebfe8d0e873..11da3018a853 100644 --- a/net/rfkill/rfkill-regulator.c +++ b/net/rfkill/rfkill-regulator.c | |||
@@ -36,12 +36,12 @@ static int rfkill_regulator_set_block(void *data, bool blocked) | |||
36 | if (blocked) { | 36 | if (blocked) { |
37 | if (rfkill_data->reg_enabled) { | 37 | if (rfkill_data->reg_enabled) { |
38 | regulator_disable(rfkill_data->vcc); | 38 | regulator_disable(rfkill_data->vcc); |
39 | rfkill_data->reg_enabled = 0; | 39 | rfkill_data->reg_enabled = false; |
40 | } | 40 | } |
41 | } else { | 41 | } else { |
42 | if (!rfkill_data->reg_enabled) { | 42 | if (!rfkill_data->reg_enabled) { |
43 | regulator_enable(rfkill_data->vcc); | 43 | regulator_enable(rfkill_data->vcc); |
44 | rfkill_data->reg_enabled = 1; | 44 | rfkill_data->reg_enabled = true; |
45 | } | 45 | } |
46 | } | 46 | } |
47 | 47 | ||
@@ -96,7 +96,7 @@ static int __devinit rfkill_regulator_probe(struct platform_device *pdev) | |||
96 | 96 | ||
97 | if (regulator_is_enabled(vcc)) { | 97 | if (regulator_is_enabled(vcc)) { |
98 | dev_dbg(&pdev->dev, "Regulator already enabled\n"); | 98 | dev_dbg(&pdev->dev, "Regulator already enabled\n"); |
99 | rfkill_data->reg_enabled = 1; | 99 | rfkill_data->reg_enabled = true; |
100 | } | 100 | } |
101 | rfkill_data->vcc = vcc; | 101 | rfkill_data->vcc = vcc; |
102 | rfkill_data->rf_kill = rf_kill; | 102 | rfkill_data->rf_kill = rf_kill; |