aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe.montjoie@gmail.com>2019-01-18 09:03:27 -0500
committerGuenter Roeck <linux@roeck-us.net>2019-02-18 17:23:29 -0500
commitd6450e8524393fe0341dd010354fbeab88e5001c (patch)
treedeab5fcbe899f8ead84458781c2d203b60de0c6a /drivers/hwmon
parent66b331ca2876914ffca44da574fa2453f3490742 (diff)
hwmon: (adm1029) Fix Logical continuations should be on the previous line checkpatch warning
This patchs fix the "Logical continuations should be on the previous line" checkpatch warning. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/adm1029.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c
index f9f4f1f4a4c7..4339f6b864a1 100644
--- a/drivers/hwmon/adm1029.c
+++ b/drivers/hwmon/adm1029.c
@@ -131,8 +131,7 @@ static struct adm1029_data *adm1029_update_device(struct device *dev)
131 * Use the "cache" Luke, don't recheck values 131 * Use the "cache" Luke, don't recheck values
132 * if there are already checked not a long time later 132 * if there are already checked not a long time later
133 */ 133 */
134 if (time_after(jiffies, data->last_updated + HZ * 2) 134 if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) {
135 || !data->valid) {
136 int nr; 135 int nr;
137 136
138 dev_dbg(&client->dev, "Updating adm1029 data\n"); 137 dev_dbg(&client->dev, "Updating adm1029 data\n");
@@ -182,9 +181,9 @@ show_fan(struct device *dev, struct device_attribute *devattr, char *buf)
182 struct adm1029_data *data = adm1029_update_device(dev); 181 struct adm1029_data *data = adm1029_update_device(dev);
183 u16 val; 182 u16 val;
184 183
185 if (data->fan[attr->index] == 0 184 if (data->fan[attr->index] == 0 ||
186 || (data->fan_div[attr->index] & 0xC0) == 0 185 (data->fan_div[attr->index] & 0xC0) == 0 ||
187 || data->fan[attr->index] == 255) { 186 data->fan[attr->index] == 255) {
188 return sprintf(buf, "0\n"); 187 return sprintf(buf, "0\n");
189 } 188 }
190 189
@@ -325,8 +324,8 @@ static int adm1029_detect(struct i2c_client *client,
325 nb_fan_support = i2c_smbus_read_byte_data(client, 324 nb_fan_support = i2c_smbus_read_byte_data(client,
326 ADM1029_REG_NB_FAN_SUPPORT); 325 ADM1029_REG_NB_FAN_SUPPORT);
327 /* 0x41 is Analog Devices */ 326 /* 0x41 is Analog Devices */
328 if (man_id != 0x41 || (temp_devices_installed & 0xf9) != 0x01 327 if (man_id != 0x41 || (temp_devices_installed & 0xf9) != 0x01 ||
329 || nb_fan_support != 0x03) 328 nb_fan_support != 0x03)
330 return -ENODEV; 329 return -ENODEV;
331 330
332 if ((chip_id & 0xF0) != 0x00) { 331 if ((chip_id & 0xF0) != 0x00) {