summaryrefslogtreecommitdiff
path: root/drivers/macintosh/therm_adt746x.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-01-24 04:42:28 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-28 09:21:09 +0300
commit4f256d561447c6e1bf8b70e19daae08da4279f1c (patch)
tree9b442a12e7ee24a456f52fe3c05f1d0f8e25576f /drivers/macintosh/therm_adt746x.c
parent0bc00914010e3826a3d168d1c879f79800a11bae (diff)
downloadlinux-4f256d561447c6e1bf8b70e19daae08da4279f1c.tar.xz
macintosh: change some data types from int to bool
Change the data type of the following variables from int to bool across all macintosh drivers: started slots_started pm121_started wf_smu_started Some of these issues were detected with the help of Coccinelle. Suggested-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/macintosh/therm_adt746x.c')
-rw-r--r--drivers/macintosh/therm_adt746x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index f433521a6f9d..d7cd5afa38cd 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -230,7 +230,7 @@ static void update_fans_speed (struct thermostat *th)
/* we don't care about local sensor, so we start at sensor 1 */
for (i = 1; i < 3; i++) {
- int started = 0;
+ bool started = false;
int fan_number = (th->type == ADT7460 && i == 2);
int var = th->temps[i] - th->limits[i];
@@ -243,7 +243,7 @@ static void update_fans_speed (struct thermostat *th)
if (abs(var - th->last_var[fan_number]) < 2)
continue;
- started = 1;
+ started = true;
new_speed = fan_speed + ((var-1)*step);
if (new_speed < fan_speed)