diff options
Diffstat (limited to 'drivers/hwmon/atxp1.c')
| -rw-r--r-- | drivers/hwmon/atxp1.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon/atxp1.c index 79b8df258371..1c7e9a98b757 100644 --- a/drivers/hwmon/atxp1.c +++ b/drivers/hwmon/atxp1.c @@ -16,6 +16,7 @@ #include <linux/hwmon.h> #include <linux/hwmon-vid.h> #include <linux/err.h> +#include <linux/kstrtox.h> #include <linux/mutex.h> #include <linux/sysfs.h> #include <linux/slab.h> @@ -37,7 +38,7 @@ struct atxp1_data { struct i2c_client *client; struct mutex update_lock; unsigned long last_updated; - u8 valid; + bool valid; struct { u8 vid; /* VID output register */ u8 cpu_vid; /* VID input from CPU */ @@ -63,7 +64,7 @@ static struct atxp1_data *atxp1_update_device(struct device *dev) data->reg.gpio1 = i2c_smbus_read_byte_data(client, ATXP1_GPIO1); data->reg.gpio2 = i2c_smbus_read_byte_data(client, ATXP1_GPIO2); - data->valid = 1; + data->valid = true; } mutex_unlock(&data->update_lock); @@ -136,7 +137,7 @@ static ssize_t cpu0_vid_store(struct device *dev, ATXP1_VID, cvid | ATXP1_VIDENA); } - data->valid = 0; + data->valid = false; return count; } @@ -180,7 +181,7 @@ static ssize_t gpio1_store(struct device *dev, struct device_attribute *attr, i2c_smbus_write_byte_data(client, ATXP1_GPIO1, value); - data->valid = 0; + data->valid = false; } return count; @@ -224,7 +225,7 @@ static ssize_t gpio2_store(struct device *dev, struct device_attribute *attr, i2c_smbus_write_byte_data(client, ATXP1_GPIO2, value); - data->valid = 0; + data->valid = false; } return count; @@ -244,8 +245,7 @@ static struct attribute *atxp1_attrs[] = { }; ATTRIBUTE_GROUPS(atxp1); -static int atxp1_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int atxp1_probe(struct i2c_client *client) { struct device *dev = &client->dev; struct atxp1_data *data; @@ -278,7 +278,7 @@ static int atxp1_probe(struct i2c_client *client, }; static const struct i2c_device_id atxp1_id[] = { - { "atxp1", 0 }, + { "atxp1" }, { } }; MODULE_DEVICE_TABLE(i2c, atxp1_id); |
