hwmon: (max6650) Declare valid as boolean
authorGuenter Roeck <linux@roeck-us.net>
Fri, 7 Jun 2019 17:23:19 +0000 (10:23 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 24 Jun 2019 01:33:01 +0000 (18:33 -0700)
Declare valid as boolean to match its use case.

Cc: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/max6650.c

index caede4d..9056531 100644 (file)
@@ -104,7 +104,7 @@ struct max6650_data {
        const struct attribute_group *groups[3];
        struct mutex update_lock;
        int nr_fans;
-       char valid; /* zero until following fields are valid */
+       bool valid; /* false until following fields are valid */
        unsigned long last_updated; /* in jiffies */
 
        /* register values */
@@ -183,7 +183,7 @@ static struct max6650_data *max6650_update_device(struct device *dev)
                                                        MAX6650_REG_ALARM);
 
                data->last_updated = jiffies;
-               data->valid = 1;
+               data->valid = true;
        }
 
        mutex_unlock(&data->update_lock);