diff options
Diffstat (limited to 'drivers/hwmon/lm92.c')
-rw-r--r-- | drivers/hwmon/lm92.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/hwmon/lm92.c b/drivers/hwmon/lm92.c index 7c31e6205f85..8fcbd4d422c5 100644 --- a/drivers/hwmon/lm92.c +++ b/drivers/hwmon/lm92.c | |||
@@ -117,16 +117,16 @@ static struct lm92_data *lm92_update_device(struct device *dev) | |||
117 | if (time_after(jiffies, data->last_updated + HZ) | 117 | if (time_after(jiffies, data->last_updated + HZ) |
118 | || !data->valid) { | 118 | || !data->valid) { |
119 | dev_dbg(&client->dev, "Updating lm92 data\n"); | 119 | dev_dbg(&client->dev, "Updating lm92 data\n"); |
120 | data->temp1_input = swab16(i2c_smbus_read_word_data(client, | 120 | data->temp1_input = i2c_smbus_read_word_swapped(client, |
121 | LM92_REG_TEMP)); | 121 | LM92_REG_TEMP); |
122 | data->temp1_hyst = swab16(i2c_smbus_read_word_data(client, | 122 | data->temp1_hyst = i2c_smbus_read_word_swapped(client, |
123 | LM92_REG_TEMP_HYST)); | 123 | LM92_REG_TEMP_HYST); |
124 | data->temp1_crit = swab16(i2c_smbus_read_word_data(client, | 124 | data->temp1_crit = i2c_smbus_read_word_swapped(client, |
125 | LM92_REG_TEMP_CRIT)); | 125 | LM92_REG_TEMP_CRIT); |
126 | data->temp1_min = swab16(i2c_smbus_read_word_data(client, | 126 | data->temp1_min = i2c_smbus_read_word_swapped(client, |
127 | LM92_REG_TEMP_LOW)); | 127 | LM92_REG_TEMP_LOW); |
128 | data->temp1_max = swab16(i2c_smbus_read_word_data(client, | 128 | data->temp1_max = i2c_smbus_read_word_swapped(client, |
129 | LM92_REG_TEMP_HIGH)); | 129 | LM92_REG_TEMP_HIGH); |
130 | 130 | ||
131 | data->last_updated = jiffies; | 131 | data->last_updated = jiffies; |
132 | data->valid = 1; | 132 | data->valid = 1; |
@@ -158,7 +158,7 @@ static ssize_t set_##value(struct device *dev, struct device_attribute *attr, co | |||
158 | \ | 158 | \ |
159 | mutex_lock(&data->update_lock); \ | 159 | mutex_lock(&data->update_lock); \ |
160 | data->value = TEMP_TO_REG(val); \ | 160 | data->value = TEMP_TO_REG(val); \ |
161 | i2c_smbus_write_word_data(client, reg, swab16(data->value)); \ | 161 | i2c_smbus_write_word_swapped(client, reg, data->value); \ |
162 | mutex_unlock(&data->update_lock); \ | 162 | mutex_unlock(&data->update_lock); \ |
163 | return count; \ | 163 | return count; \ |
164 | } | 164 | } |
@@ -194,8 +194,8 @@ static ssize_t set_temp1_crit_hyst(struct device *dev, struct device_attribute * | |||
194 | 194 | ||
195 | mutex_lock(&data->update_lock); | 195 | mutex_lock(&data->update_lock); |
196 | data->temp1_hyst = TEMP_FROM_REG(data->temp1_crit) - val; | 196 | data->temp1_hyst = TEMP_FROM_REG(data->temp1_crit) - val; |
197 | i2c_smbus_write_word_data(client, LM92_REG_TEMP_HYST, | 197 | i2c_smbus_write_word_swapped(client, LM92_REG_TEMP_HYST, |
198 | swab16(TEMP_TO_REG(data->temp1_hyst))); | 198 | TEMP_TO_REG(data->temp1_hyst)); |
199 | mutex_unlock(&data->update_lock); | 199 | mutex_unlock(&data->update_lock); |
200 | return count; | 200 | return count; |
201 | } | 201 | } |