Commit 0665a1d6 authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (lm92) Fix whitespace issues



Smatch complains:

drivers/hwmon/lm92.c:209 set_temp_hyst() warn: inconsistent indenting

While at it, fix various other whitespace issues reported by checkpatch
(double empty lines, missing empty lines, whitespace at empty line).

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent a31796c3
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -127,8 +127,8 @@ static struct lm92_data *lm92_update_device(struct device *dev)

	mutex_lock(&data->update_lock);

	if (time_after(jiffies, data->last_updated + HZ)
	 || !data->valid) {
	if (time_after(jiffies, data->last_updated + HZ) ||
	    !data->valid) {
		dev_dbg(&client->dev, "Updating lm92 data\n");
		for (i = 0; i < t_num_regs; i++) {
			data->temp[i] =
@@ -178,6 +178,7 @@ static ssize_t show_temp_hyst(struct device *dev,
{
	struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
	struct lm92_data *data = lm92_update_device(dev);

	return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[attr->index])
		       - TEMP_FROM_REG(data->temp[t_hyst]));
}
@@ -186,6 +187,7 @@ static ssize_t temp1_min_hyst_show(struct device *dev,
				   struct device_attribute *attr, char *buf)
{
	struct lm92_data *data = lm92_update_device(dev);

	return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[t_min])
		       + TEMP_FROM_REG(data->temp[t_hyst]));
}
@@ -218,6 +220,7 @@ static ssize_t alarms_show(struct device *dev, struct device_attribute *attr,
			   char *buf)
{
	struct lm92_data *data = lm92_update_device(dev);

	return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->temp[t_input]));
}

@@ -324,7 +327,6 @@ static int lm92_probe(struct i2c_client *new_client,
	return PTR_ERR_OR_ZERO(hwmon_dev);
}


/*
 * Module and driver stuff
 */