aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2016-06-18 18:39:08 -0400
committerGuenter Roeck <linux@roeck-us.net>2016-07-09 11:35:40 -0400
commit2f83ab77b43807edf695ca9a31673be2197a33b3 (patch)
treea118b9a352435d757a8883654c2089ed0329103e
parent10bfef47bd259a800a731a2b459599b14cfb8052 (diff)
hwmon: (lm90) Use bool for valid flag
Use bool for valid flag and leave it up to the compiler to find an optimal representation. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/lm90.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 322a73d3d135..c38d6e4e95b5 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -367,7 +367,7 @@ struct lm90_data {
367 struct i2c_client *client; 367 struct i2c_client *client;
368 const struct attribute_group *groups[6]; 368 const struct attribute_group *groups[6];
369 struct mutex update_lock; 369 struct mutex update_lock;
370 char valid; /* zero until following fields are valid */ 370 bool valid; /* true if register values are valid */
371 unsigned long last_updated; /* in jiffies */ 371 unsigned long last_updated; /* in jiffies */
372 int kind; 372 int kind;
373 u32 flags; 373 u32 flags;
@@ -624,7 +624,7 @@ static struct lm90_data *lm90_update_device(struct device *dev)
624 if (time_after(jiffies, next_update) || !data->valid) { 624 if (time_after(jiffies, next_update) || !data->valid) {
625 dev_dbg(&client->dev, "Updating lm90 data.\n"); 625 dev_dbg(&client->dev, "Updating lm90 data.\n");
626 626
627 data->valid = 0; 627 data->valid = false;
628 628
629 val = lm90_read_reg(client, LM90_REG_R_LOCAL_LOW); 629 val = lm90_read_reg(client, LM90_REG_R_LOCAL_LOW);
630 if (val < 0) 630 if (val < 0)
@@ -697,7 +697,7 @@ static struct lm90_data *lm90_update_device(struct device *dev)
697 } 697 }
698 698
699 data->last_updated = jiffies; 699 data->last_updated = jiffies;
700 data->valid = 1; 700 data->valid = true;
701 } 701 }
702 702
703error: 703error: