diff options
author | Yani Ioannou <yani.ioannou@gmail.com> | 2005-05-17 06:42:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:33 -0400 |
commit | a5099cfc2e82240b0a3e72ad79a5969d5af1a7dc (patch) | |
tree | aca3273e927a4d65f8f5fdf4cf5d8283969a3b43 /drivers/i2c/chips/sis5595.c | |
parent | 8627f9ba531269d8850919c62af1b017438e2e79 (diff) |
[PATCH] Driver Core: drivers/i2c/chips/pc87360.c - w83627hf.c: update device attribute callbacks
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/chips/sis5595.c')
-rw-r--r-- | drivers/i2c/chips/sis5595.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/i2c/chips/sis5595.c b/drivers/i2c/chips/sis5595.c index 7ea84532df32..c6650727a27d 100644 --- a/drivers/i2c/chips/sis5595.c +++ b/drivers/i2c/chips/sis5595.c | |||
@@ -256,28 +256,28 @@ static ssize_t set_in_max(struct device *dev, const char *buf, | |||
256 | 256 | ||
257 | #define show_in_offset(offset) \ | 257 | #define show_in_offset(offset) \ |
258 | static ssize_t \ | 258 | static ssize_t \ |
259 | show_in##offset (struct device *dev, char *buf) \ | 259 | show_in##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
260 | { \ | 260 | { \ |
261 | return show_in(dev, buf, offset); \ | 261 | return show_in(dev, buf, offset); \ |
262 | } \ | 262 | } \ |
263 | static DEVICE_ATTR(in##offset##_input, S_IRUGO, \ | 263 | static DEVICE_ATTR(in##offset##_input, S_IRUGO, \ |
264 | show_in##offset, NULL); \ | 264 | show_in##offset, NULL); \ |
265 | static ssize_t \ | 265 | static ssize_t \ |
266 | show_in##offset##_min (struct device *dev, char *buf) \ | 266 | show_in##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \ |
267 | { \ | 267 | { \ |
268 | return show_in_min(dev, buf, offset); \ | 268 | return show_in_min(dev, buf, offset); \ |
269 | } \ | 269 | } \ |
270 | static ssize_t \ | 270 | static ssize_t \ |
271 | show_in##offset##_max (struct device *dev, char *buf) \ | 271 | show_in##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \ |
272 | { \ | 272 | { \ |
273 | return show_in_max(dev, buf, offset); \ | 273 | return show_in_max(dev, buf, offset); \ |
274 | } \ | 274 | } \ |
275 | static ssize_t set_in##offset##_min (struct device *dev, \ | 275 | static ssize_t set_in##offset##_min (struct device *dev, struct device_attribute *attr, \ |
276 | const char *buf, size_t count) \ | 276 | const char *buf, size_t count) \ |
277 | { \ | 277 | { \ |
278 | return set_in_min(dev, buf, count, offset); \ | 278 | return set_in_min(dev, buf, count, offset); \ |
279 | } \ | 279 | } \ |
280 | static ssize_t set_in##offset##_max (struct device *dev, \ | 280 | static ssize_t set_in##offset##_max (struct device *dev, struct device_attribute *attr, \ |
281 | const char *buf, size_t count) \ | 281 | const char *buf, size_t count) \ |
282 | { \ | 282 | { \ |
283 | return set_in_max(dev, buf, count, offset); \ | 283 | return set_in_max(dev, buf, count, offset); \ |
@@ -294,19 +294,19 @@ show_in_offset(3); | |||
294 | show_in_offset(4); | 294 | show_in_offset(4); |
295 | 295 | ||
296 | /* Temperature */ | 296 | /* Temperature */ |
297 | static ssize_t show_temp(struct device *dev, char *buf) | 297 | static ssize_t show_temp(struct device *dev, struct device_attribute *attr, char *buf) |
298 | { | 298 | { |
299 | struct sis5595_data *data = sis5595_update_device(dev); | 299 | struct sis5595_data *data = sis5595_update_device(dev); |
300 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp)); | 300 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp)); |
301 | } | 301 | } |
302 | 302 | ||
303 | static ssize_t show_temp_over(struct device *dev, char *buf) | 303 | static ssize_t show_temp_over(struct device *dev, struct device_attribute *attr, char *buf) |
304 | { | 304 | { |
305 | struct sis5595_data *data = sis5595_update_device(dev); | 305 | struct sis5595_data *data = sis5595_update_device(dev); |
306 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over)); | 306 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over)); |
307 | } | 307 | } |
308 | 308 | ||
309 | static ssize_t set_temp_over(struct device *dev, const char *buf, size_t count) | 309 | static ssize_t set_temp_over(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
310 | { | 310 | { |
311 | struct i2c_client *client = to_i2c_client(dev); | 311 | struct i2c_client *client = to_i2c_client(dev); |
312 | struct sis5595_data *data = i2c_get_clientdata(client); | 312 | struct sis5595_data *data = i2c_get_clientdata(client); |
@@ -319,13 +319,13 @@ static ssize_t set_temp_over(struct device *dev, const char *buf, size_t count) | |||
319 | return count; | 319 | return count; |
320 | } | 320 | } |
321 | 321 | ||
322 | static ssize_t show_temp_hyst(struct device *dev, char *buf) | 322 | static ssize_t show_temp_hyst(struct device *dev, struct device_attribute *attr, char *buf) |
323 | { | 323 | { |
324 | struct sis5595_data *data = sis5595_update_device(dev); | 324 | struct sis5595_data *data = sis5595_update_device(dev); |
325 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_hyst)); | 325 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_hyst)); |
326 | } | 326 | } |
327 | 327 | ||
328 | static ssize_t set_temp_hyst(struct device *dev, const char *buf, size_t count) | 328 | static ssize_t set_temp_hyst(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
329 | { | 329 | { |
330 | struct i2c_client *client = to_i2c_client(dev); | 330 | struct i2c_client *client = to_i2c_client(dev); |
331 | struct sis5595_data *data = i2c_get_clientdata(client); | 331 | struct sis5595_data *data = i2c_get_clientdata(client); |
@@ -426,19 +426,19 @@ static ssize_t set_fan_div(struct device *dev, const char *buf, | |||
426 | } | 426 | } |
427 | 427 | ||
428 | #define show_fan_offset(offset) \ | 428 | #define show_fan_offset(offset) \ |
429 | static ssize_t show_fan_##offset (struct device *dev, char *buf) \ | 429 | static ssize_t show_fan_##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
430 | { \ | 430 | { \ |
431 | return show_fan(dev, buf, offset - 1); \ | 431 | return show_fan(dev, buf, offset - 1); \ |
432 | } \ | 432 | } \ |
433 | static ssize_t show_fan_##offset##_min (struct device *dev, char *buf) \ | 433 | static ssize_t show_fan_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \ |
434 | { \ | 434 | { \ |
435 | return show_fan_min(dev, buf, offset - 1); \ | 435 | return show_fan_min(dev, buf, offset - 1); \ |
436 | } \ | 436 | } \ |
437 | static ssize_t show_fan_##offset##_div (struct device *dev, char *buf) \ | 437 | static ssize_t show_fan_##offset##_div (struct device *dev, struct device_attribute *attr, char *buf) \ |
438 | { \ | 438 | { \ |
439 | return show_fan_div(dev, buf, offset - 1); \ | 439 | return show_fan_div(dev, buf, offset - 1); \ |
440 | } \ | 440 | } \ |
441 | static ssize_t set_fan_##offset##_min (struct device *dev, \ | 441 | static ssize_t set_fan_##offset##_min (struct device *dev, struct device_attribute *attr, \ |
442 | const char *buf, size_t count) \ | 442 | const char *buf, size_t count) \ |
443 | { \ | 443 | { \ |
444 | return set_fan_min(dev, buf, count, offset - 1); \ | 444 | return set_fan_min(dev, buf, count, offset - 1); \ |
@@ -450,13 +450,13 @@ static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \ | |||
450 | show_fan_offset(1); | 450 | show_fan_offset(1); |
451 | show_fan_offset(2); | 451 | show_fan_offset(2); |
452 | 452 | ||
453 | static ssize_t set_fan_1_div(struct device *dev, const char *buf, | 453 | static ssize_t set_fan_1_div(struct device *dev, struct device_attribute *attr, const char *buf, |
454 | size_t count) | 454 | size_t count) |
455 | { | 455 | { |
456 | return set_fan_div(dev, buf, count, 0) ; | 456 | return set_fan_div(dev, buf, count, 0) ; |
457 | } | 457 | } |
458 | 458 | ||
459 | static ssize_t set_fan_2_div(struct device *dev, const char *buf, | 459 | static ssize_t set_fan_2_div(struct device *dev, struct device_attribute *attr, const char *buf, |
460 | size_t count) | 460 | size_t count) |
461 | { | 461 | { |
462 | return set_fan_div(dev, buf, count, 1) ; | 462 | return set_fan_div(dev, buf, count, 1) ; |
@@ -467,7 +467,7 @@ static DEVICE_ATTR(fan2_div, S_IRUGO | S_IWUSR, | |||
467 | show_fan_2_div, set_fan_2_div); | 467 | show_fan_2_div, set_fan_2_div); |
468 | 468 | ||
469 | /* Alarms */ | 469 | /* Alarms */ |
470 | static ssize_t show_alarms(struct device *dev, char *buf) | 470 | static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf) |
471 | { | 471 | { |
472 | struct sis5595_data *data = sis5595_update_device(dev); | 472 | struct sis5595_data *data = sis5595_update_device(dev); |
473 | return sprintf(buf, "%d\n", data->alarms); | 473 | return sprintf(buf, "%d\n", data->alarms); |