aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/therm_adt746x.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-01-23 19:42:28 -0600
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-28 17:21:09 +1100
commit4f256d561447c6e1bf8b70e19daae08da4279f1c (patch)
tree9b442a12e7ee24a456f52fe3c05f1d0f8e25576f /drivers/macintosh/therm_adt746x.c
parentpowerpc/watchdog: Print the NIP in soft_nmi_interrupt() (diff)
downloadlinux-dev-4f256d561447c6e1bf8b70e19daae08da4279f1c.tar.xz
linux-dev-4f256d561447c6e1bf8b70e19daae08da4279f1c.zip
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)