aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/smsc47m1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips/smsc47m1.c')
-rw-r--r--drivers/i2c/chips/smsc47m1.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/i2c/chips/smsc47m1.c b/drivers/i2c/chips/smsc47m1.c
index 0e12ca369413..13d6d4a8bc7d 100644
--- a/drivers/i2c/chips/smsc47m1.c
+++ b/drivers/i2c/chips/smsc47m1.c
@@ -184,7 +184,7 @@ static ssize_t get_pwm_en(struct device *dev, char *buf, int nr)
184 return sprintf(buf, "%d\n", PWM_EN_FROM_REG(data->pwm[nr])); 184 return sprintf(buf, "%d\n", PWM_EN_FROM_REG(data->pwm[nr]));
185} 185}
186 186
187static ssize_t get_alarms(struct device *dev, char *buf) 187static ssize_t get_alarms(struct device *dev, struct device_attribute *attr, char *buf)
188{ 188{
189 struct smsc47m1_data *data = smsc47m1_update_device(dev, 0); 189 struct smsc47m1_data *data = smsc47m1_update_device(dev, 0);
190 return sprintf(buf, "%d\n", data->alarms); 190 return sprintf(buf, "%d\n", data->alarms);
@@ -298,42 +298,42 @@ static ssize_t set_pwm_en(struct device *dev, const char *buf,
298} 298}
299 299
300#define fan_present(offset) \ 300#define fan_present(offset) \
301static ssize_t get_fan##offset (struct device *dev, char *buf) \ 301static ssize_t get_fan##offset (struct device *dev, struct device_attribute *attr, char *buf) \
302{ \ 302{ \
303 return get_fan(dev, buf, offset - 1); \ 303 return get_fan(dev, buf, offset - 1); \
304} \ 304} \
305static ssize_t get_fan##offset##_min (struct device *dev, char *buf) \ 305static ssize_t get_fan##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \
306{ \ 306{ \
307 return get_fan_min(dev, buf, offset - 1); \ 307 return get_fan_min(dev, buf, offset - 1); \
308} \ 308} \
309static ssize_t set_fan##offset##_min (struct device *dev, \ 309static ssize_t set_fan##offset##_min (struct device *dev, struct device_attribute *attr, \
310 const char *buf, size_t count) \ 310 const char *buf, size_t count) \
311{ \ 311{ \
312 return set_fan_min(dev, buf, count, offset - 1); \ 312 return set_fan_min(dev, buf, count, offset - 1); \
313} \ 313} \
314static ssize_t get_fan##offset##_div (struct device *dev, char *buf) \ 314static ssize_t get_fan##offset##_div (struct device *dev, struct device_attribute *attr, char *buf) \
315{ \ 315{ \
316 return get_fan_div(dev, buf, offset - 1); \ 316 return get_fan_div(dev, buf, offset - 1); \
317} \ 317} \
318static ssize_t set_fan##offset##_div (struct device *dev, \ 318static ssize_t set_fan##offset##_div (struct device *dev, struct device_attribute *attr, \
319 const char *buf, size_t count) \ 319 const char *buf, size_t count) \
320{ \ 320{ \
321 return set_fan_div(dev, buf, count, offset - 1); \ 321 return set_fan_div(dev, buf, count, offset - 1); \
322} \ 322} \
323static ssize_t get_pwm##offset (struct device *dev, char *buf) \ 323static ssize_t get_pwm##offset (struct device *dev, struct device_attribute *attr, char *buf) \
324{ \ 324{ \
325 return get_pwm(dev, buf, offset - 1); \ 325 return get_pwm(dev, buf, offset - 1); \
326} \ 326} \
327static ssize_t set_pwm##offset (struct device *dev, \ 327static ssize_t set_pwm##offset (struct device *dev, struct device_attribute *attr, \
328 const char *buf, size_t count) \ 328 const char *buf, size_t count) \
329{ \ 329{ \
330 return set_pwm(dev, buf, count, offset - 1); \ 330 return set_pwm(dev, buf, count, offset - 1); \
331} \ 331} \
332static ssize_t get_pwm##offset##_en (struct device *dev, char *buf) \ 332static ssize_t get_pwm##offset##_en (struct device *dev, struct device_attribute *attr, char *buf) \
333{ \ 333{ \
334 return get_pwm_en(dev, buf, offset - 1); \ 334 return get_pwm_en(dev, buf, offset - 1); \
335} \ 335} \
336static ssize_t set_pwm##offset##_en (struct device *dev, \ 336static ssize_t set_pwm##offset##_en (struct device *dev, struct device_attribute *attr, \
337 const char *buf, size_t count) \ 337 const char *buf, size_t count) \
338{ \ 338{ \
339 return set_pwm_en(dev, buf, count, offset - 1); \ 339 return set_pwm_en(dev, buf, count, offset - 1); \