diff options
Diffstat (limited to 'drivers/i2c/chips/lm92.c')
| -rw-r--r-- | drivers/i2c/chips/lm92.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/i2c/chips/lm92.c b/drivers/i2c/chips/lm92.c index fe6e83d70a72..215c8e40ffdd 100644 --- a/drivers/i2c/chips/lm92.c +++ b/drivers/i2c/chips/lm92.c | |||
| @@ -140,7 +140,7 @@ static struct lm92_data *lm92_update_device(struct device *dev) | |||
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | #define show_temp(value) \ | 142 | #define show_temp(value) \ |
| 143 | static ssize_t show_##value(struct device *dev, char *buf) \ | 143 | static ssize_t show_##value(struct device *dev, struct device_attribute *attr, char *buf) \ |
| 144 | { \ | 144 | { \ |
| 145 | struct lm92_data *data = lm92_update_device(dev); \ | 145 | struct lm92_data *data = lm92_update_device(dev); \ |
| 146 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->value)); \ | 146 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->value)); \ |
| @@ -151,7 +151,7 @@ show_temp(temp1_min); | |||
| 151 | show_temp(temp1_max); | 151 | show_temp(temp1_max); |
| 152 | 152 | ||
| 153 | #define set_temp(value, reg) \ | 153 | #define set_temp(value, reg) \ |
| 154 | static ssize_t set_##value(struct device *dev, const char *buf, \ | 154 | static ssize_t set_##value(struct device *dev, struct device_attribute *attr, const char *buf, \ |
| 155 | size_t count) \ | 155 | size_t count) \ |
| 156 | { \ | 156 | { \ |
| 157 | struct i2c_client *client = to_i2c_client(dev); \ | 157 | struct i2c_client *client = to_i2c_client(dev); \ |
| @@ -168,26 +168,26 @@ set_temp(temp1_crit, LM92_REG_TEMP_CRIT); | |||
| 168 | set_temp(temp1_min, LM92_REG_TEMP_LOW); | 168 | set_temp(temp1_min, LM92_REG_TEMP_LOW); |
| 169 | set_temp(temp1_max, LM92_REG_TEMP_HIGH); | 169 | set_temp(temp1_max, LM92_REG_TEMP_HIGH); |
| 170 | 170 | ||
| 171 | static ssize_t show_temp1_crit_hyst(struct device *dev, char *buf) | 171 | static ssize_t show_temp1_crit_hyst(struct device *dev, struct device_attribute *attr, char *buf) |
| 172 | { | 172 | { |
| 173 | struct lm92_data *data = lm92_update_device(dev); | 173 | struct lm92_data *data = lm92_update_device(dev); |
| 174 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp1_crit) | 174 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp1_crit) |
| 175 | - TEMP_FROM_REG(data->temp1_hyst)); | 175 | - TEMP_FROM_REG(data->temp1_hyst)); |
| 176 | } | 176 | } |
| 177 | static ssize_t show_temp1_max_hyst(struct device *dev, char *buf) | 177 | static ssize_t show_temp1_max_hyst(struct device *dev, struct device_attribute *attr, char *buf) |
| 178 | { | 178 | { |
| 179 | struct lm92_data *data = lm92_update_device(dev); | 179 | struct lm92_data *data = lm92_update_device(dev); |
| 180 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp1_max) | 180 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp1_max) |
| 181 | - TEMP_FROM_REG(data->temp1_hyst)); | 181 | - TEMP_FROM_REG(data->temp1_hyst)); |
| 182 | } | 182 | } |
| 183 | static ssize_t show_temp1_min_hyst(struct device *dev, char *buf) | 183 | static ssize_t show_temp1_min_hyst(struct device *dev, struct device_attribute *attr, char *buf) |
| 184 | { | 184 | { |
| 185 | struct lm92_data *data = lm92_update_device(dev); | 185 | struct lm92_data *data = lm92_update_device(dev); |
| 186 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp1_min) | 186 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp1_min) |
| 187 | + TEMP_FROM_REG(data->temp1_hyst)); | 187 | + TEMP_FROM_REG(data->temp1_hyst)); |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | static ssize_t set_temp1_crit_hyst(struct device *dev, const char *buf, | 190 | static ssize_t set_temp1_crit_hyst(struct device *dev, struct device_attribute *attr, const char *buf, |
| 191 | size_t count) | 191 | size_t count) |
| 192 | { | 192 | { |
| 193 | struct i2c_client *client = to_i2c_client(dev); | 193 | struct i2c_client *client = to_i2c_client(dev); |
| @@ -202,7 +202,7 @@ static ssize_t set_temp1_crit_hyst(struct device *dev, const char *buf, | |||
| 202 | return count; | 202 | return count; |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | static ssize_t show_alarms(struct device *dev, char *buf) | 205 | static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf) |
| 206 | { | 206 | { |
| 207 | struct lm92_data *data = lm92_update_device(dev); | 207 | struct lm92_data *data = lm92_update_device(dev); |
| 208 | return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->temp1_input)); | 208 | return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->temp1_input)); |
