diff options
Diffstat (limited to 'drivers/i2c/chips/pc87360.c')
-rw-r--r-- | drivers/i2c/chips/pc87360.c | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/drivers/i2c/chips/pc87360.c b/drivers/i2c/chips/pc87360.c index 6d94c36c9218..876c68f3af31 100644 --- a/drivers/i2c/chips/pc87360.c +++ b/drivers/i2c/chips/pc87360.c | |||
@@ -33,7 +33,6 @@ | |||
33 | * the standard Super-I/O addresses is used (0x2E/0x2F or 0x4E/0x4F). | 33 | * the standard Super-I/O addresses is used (0x2E/0x2F or 0x4E/0x4F). |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/module.h> | 36 | #include <linux/module.h> |
38 | #include <linux/init.h> | 37 | #include <linux/init.h> |
39 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
@@ -282,31 +281,31 @@ static ssize_t set_fan_min(struct device *dev, const char *buf, | |||
282 | } | 281 | } |
283 | 282 | ||
284 | #define show_and_set_fan(offset) \ | 283 | #define show_and_set_fan(offset) \ |
285 | static ssize_t show_fan##offset##_input(struct device *dev, char *buf) \ | 284 | static ssize_t show_fan##offset##_input(struct device *dev, struct device_attribute *attr, char *buf) \ |
286 | { \ | 285 | { \ |
287 | struct pc87360_data *data = pc87360_update_device(dev); \ | 286 | struct pc87360_data *data = pc87360_update_device(dev); \ |
288 | return sprintf(buf, "%u\n", FAN_FROM_REG(data->fan[offset-1], \ | 287 | return sprintf(buf, "%u\n", FAN_FROM_REG(data->fan[offset-1], \ |
289 | FAN_DIV_FROM_REG(data->fan_status[offset-1]))); \ | 288 | FAN_DIV_FROM_REG(data->fan_status[offset-1]))); \ |
290 | } \ | 289 | } \ |
291 | static ssize_t show_fan##offset##_min(struct device *dev, char *buf) \ | 290 | static ssize_t show_fan##offset##_min(struct device *dev, struct device_attribute *attr, char *buf) \ |
292 | { \ | 291 | { \ |
293 | struct pc87360_data *data = pc87360_update_device(dev); \ | 292 | struct pc87360_data *data = pc87360_update_device(dev); \ |
294 | return sprintf(buf, "%u\n", FAN_FROM_REG(data->fan_min[offset-1], \ | 293 | return sprintf(buf, "%u\n", FAN_FROM_REG(data->fan_min[offset-1], \ |
295 | FAN_DIV_FROM_REG(data->fan_status[offset-1]))); \ | 294 | FAN_DIV_FROM_REG(data->fan_status[offset-1]))); \ |
296 | } \ | 295 | } \ |
297 | static ssize_t show_fan##offset##_div(struct device *dev, char *buf) \ | 296 | static ssize_t show_fan##offset##_div(struct device *dev, struct device_attribute *attr, char *buf) \ |
298 | { \ | 297 | { \ |
299 | struct pc87360_data *data = pc87360_update_device(dev); \ | 298 | struct pc87360_data *data = pc87360_update_device(dev); \ |
300 | return sprintf(buf, "%u\n", \ | 299 | return sprintf(buf, "%u\n", \ |
301 | FAN_DIV_FROM_REG(data->fan_status[offset-1])); \ | 300 | FAN_DIV_FROM_REG(data->fan_status[offset-1])); \ |
302 | } \ | 301 | } \ |
303 | static ssize_t show_fan##offset##_status(struct device *dev, char *buf) \ | 302 | static ssize_t show_fan##offset##_status(struct device *dev, struct device_attribute *attr, char *buf) \ |
304 | { \ | 303 | { \ |
305 | struct pc87360_data *data = pc87360_update_device(dev); \ | 304 | struct pc87360_data *data = pc87360_update_device(dev); \ |
306 | return sprintf(buf, "%u\n", \ | 305 | return sprintf(buf, "%u\n", \ |
307 | FAN_STATUS_FROM_REG(data->fan_status[offset-1])); \ | 306 | FAN_STATUS_FROM_REG(data->fan_status[offset-1])); \ |
308 | } \ | 307 | } \ |
309 | static ssize_t set_fan##offset##_min(struct device *dev, const char *buf, \ | 308 | static ssize_t set_fan##offset##_min(struct device *dev, struct device_attribute *attr, const char *buf, \ |
310 | size_t count) \ | 309 | size_t count) \ |
311 | { \ | 310 | { \ |
312 | return set_fan_min(dev, buf, count, offset-1); \ | 311 | return set_fan_min(dev, buf, count, offset-1); \ |
@@ -324,7 +323,7 @@ show_and_set_fan(2) | |||
324 | show_and_set_fan(3) | 323 | show_and_set_fan(3) |
325 | 324 | ||
326 | #define show_and_set_pwm(offset) \ | 325 | #define show_and_set_pwm(offset) \ |
327 | static ssize_t show_pwm##offset(struct device *dev, char *buf) \ | 326 | static ssize_t show_pwm##offset(struct device *dev, struct device_attribute *attr, char *buf) \ |
328 | { \ | 327 | { \ |
329 | struct pc87360_data *data = pc87360_update_device(dev); \ | 328 | struct pc87360_data *data = pc87360_update_device(dev); \ |
330 | return sprintf(buf, "%u\n", \ | 329 | return sprintf(buf, "%u\n", \ |
@@ -332,7 +331,7 @@ static ssize_t show_pwm##offset(struct device *dev, char *buf) \ | |||
332 | FAN_CONFIG_INVERT(data->fan_conf, \ | 331 | FAN_CONFIG_INVERT(data->fan_conf, \ |
333 | offset-1))); \ | 332 | offset-1))); \ |
334 | } \ | 333 | } \ |
335 | static ssize_t set_pwm##offset(struct device *dev, const char *buf, \ | 334 | static ssize_t set_pwm##offset(struct device *dev, struct device_attribute *attr, const char *buf, \ |
336 | size_t count) \ | 335 | size_t count) \ |
337 | { \ | 336 | { \ |
338 | struct i2c_client *client = to_i2c_client(dev); \ | 337 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -354,30 +353,30 @@ show_and_set_pwm(2) | |||
354 | show_and_set_pwm(3) | 353 | show_and_set_pwm(3) |
355 | 354 | ||
356 | #define show_and_set_in(offset) \ | 355 | #define show_and_set_in(offset) \ |
357 | static ssize_t show_in##offset##_input(struct device *dev, char *buf) \ | 356 | static ssize_t show_in##offset##_input(struct device *dev, struct device_attribute *attr, char *buf) \ |
358 | { \ | 357 | { \ |
359 | struct pc87360_data *data = pc87360_update_device(dev); \ | 358 | struct pc87360_data *data = pc87360_update_device(dev); \ |
360 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in[offset], \ | 359 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in[offset], \ |
361 | data->in_vref)); \ | 360 | data->in_vref)); \ |
362 | } \ | 361 | } \ |
363 | static ssize_t show_in##offset##_min(struct device *dev, char *buf) \ | 362 | static ssize_t show_in##offset##_min(struct device *dev, struct device_attribute *attr, char *buf) \ |
364 | { \ | 363 | { \ |
365 | struct pc87360_data *data = pc87360_update_device(dev); \ | 364 | struct pc87360_data *data = pc87360_update_device(dev); \ |
366 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in_min[offset], \ | 365 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in_min[offset], \ |
367 | data->in_vref)); \ | 366 | data->in_vref)); \ |
368 | } \ | 367 | } \ |
369 | static ssize_t show_in##offset##_max(struct device *dev, char *buf) \ | 368 | static ssize_t show_in##offset##_max(struct device *dev, struct device_attribute *attr, char *buf) \ |
370 | { \ | 369 | { \ |
371 | struct pc87360_data *data = pc87360_update_device(dev); \ | 370 | struct pc87360_data *data = pc87360_update_device(dev); \ |
372 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in_max[offset], \ | 371 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in_max[offset], \ |
373 | data->in_vref)); \ | 372 | data->in_vref)); \ |
374 | } \ | 373 | } \ |
375 | static ssize_t show_in##offset##_status(struct device *dev, char *buf) \ | 374 | static ssize_t show_in##offset##_status(struct device *dev, struct device_attribute *attr, char *buf) \ |
376 | { \ | 375 | { \ |
377 | struct pc87360_data *data = pc87360_update_device(dev); \ | 376 | struct pc87360_data *data = pc87360_update_device(dev); \ |
378 | return sprintf(buf, "%u\n", data->in_status[offset]); \ | 377 | return sprintf(buf, "%u\n", data->in_status[offset]); \ |
379 | } \ | 378 | } \ |
380 | static ssize_t set_in##offset##_min(struct device *dev, const char *buf, \ | 379 | static ssize_t set_in##offset##_min(struct device *dev, struct device_attribute *attr, const char *buf, \ |
381 | size_t count) \ | 380 | size_t count) \ |
382 | { \ | 381 | { \ |
383 | struct i2c_client *client = to_i2c_client(dev); \ | 382 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -391,7 +390,7 @@ static ssize_t set_in##offset##_min(struct device *dev, const char *buf, \ | |||
391 | up(&data->update_lock); \ | 390 | up(&data->update_lock); \ |
392 | return count; \ | 391 | return count; \ |
393 | } \ | 392 | } \ |
394 | static ssize_t set_in##offset##_max(struct device *dev, const char *buf, \ | 393 | static ssize_t set_in##offset##_max(struct device *dev, struct device_attribute *attr, const char *buf, \ |
395 | size_t count) \ | 394 | size_t count) \ |
396 | { \ | 395 | { \ |
397 | struct i2c_client *client = to_i2c_client(dev); \ | 396 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -427,36 +426,36 @@ show_and_set_in(9) | |||
427 | show_and_set_in(10) | 426 | show_and_set_in(10) |
428 | 427 | ||
429 | #define show_and_set_therm(offset) \ | 428 | #define show_and_set_therm(offset) \ |
430 | static ssize_t show_temp##offset##_input(struct device *dev, char *buf) \ | 429 | static ssize_t show_temp##offset##_input(struct device *dev, struct device_attribute *attr, char *buf) \ |
431 | { \ | 430 | { \ |
432 | struct pc87360_data *data = pc87360_update_device(dev); \ | 431 | struct pc87360_data *data = pc87360_update_device(dev); \ |
433 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in[offset+7], \ | 432 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in[offset+7], \ |
434 | data->in_vref)); \ | 433 | data->in_vref)); \ |
435 | } \ | 434 | } \ |
436 | static ssize_t show_temp##offset##_min(struct device *dev, char *buf) \ | 435 | static ssize_t show_temp##offset##_min(struct device *dev, struct device_attribute *attr, char *buf) \ |
437 | { \ | 436 | { \ |
438 | struct pc87360_data *data = pc87360_update_device(dev); \ | 437 | struct pc87360_data *data = pc87360_update_device(dev); \ |
439 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in_min[offset+7], \ | 438 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in_min[offset+7], \ |
440 | data->in_vref)); \ | 439 | data->in_vref)); \ |
441 | } \ | 440 | } \ |
442 | static ssize_t show_temp##offset##_max(struct device *dev, char *buf) \ | 441 | static ssize_t show_temp##offset##_max(struct device *dev, struct device_attribute *attr, char *buf) \ |
443 | { \ | 442 | { \ |
444 | struct pc87360_data *data = pc87360_update_device(dev); \ | 443 | struct pc87360_data *data = pc87360_update_device(dev); \ |
445 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in_max[offset+7], \ | 444 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in_max[offset+7], \ |
446 | data->in_vref)); \ | 445 | data->in_vref)); \ |
447 | } \ | 446 | } \ |
448 | static ssize_t show_temp##offset##_crit(struct device *dev, char *buf) \ | 447 | static ssize_t show_temp##offset##_crit(struct device *dev, struct device_attribute *attr, char *buf) \ |
449 | { \ | 448 | { \ |
450 | struct pc87360_data *data = pc87360_update_device(dev); \ | 449 | struct pc87360_data *data = pc87360_update_device(dev); \ |
451 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in_crit[offset-4], \ | 450 | return sprintf(buf, "%u\n", IN_FROM_REG(data->in_crit[offset-4], \ |
452 | data->in_vref)); \ | 451 | data->in_vref)); \ |
453 | } \ | 452 | } \ |
454 | static ssize_t show_temp##offset##_status(struct device *dev, char *buf) \ | 453 | static ssize_t show_temp##offset##_status(struct device *dev, struct device_attribute *attr, char *buf) \ |
455 | { \ | 454 | { \ |
456 | struct pc87360_data *data = pc87360_update_device(dev); \ | 455 | struct pc87360_data *data = pc87360_update_device(dev); \ |
457 | return sprintf(buf, "%u\n", data->in_status[offset+7]); \ | 456 | return sprintf(buf, "%u\n", data->in_status[offset+7]); \ |
458 | } \ | 457 | } \ |
459 | static ssize_t set_temp##offset##_min(struct device *dev, const char *buf, \ | 458 | static ssize_t set_temp##offset##_min(struct device *dev, struct device_attribute *attr, const char *buf, \ |
460 | size_t count) \ | 459 | size_t count) \ |
461 | { \ | 460 | { \ |
462 | struct i2c_client *client = to_i2c_client(dev); \ | 461 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -470,7 +469,7 @@ static ssize_t set_temp##offset##_min(struct device *dev, const char *buf, \ | |||
470 | up(&data->update_lock); \ | 469 | up(&data->update_lock); \ |
471 | return count; \ | 470 | return count; \ |
472 | } \ | 471 | } \ |
473 | static ssize_t set_temp##offset##_max(struct device *dev, const char *buf, \ | 472 | static ssize_t set_temp##offset##_max(struct device *dev, struct device_attribute *attr, const char *buf, \ |
474 | size_t count) \ | 473 | size_t count) \ |
475 | { \ | 474 | { \ |
476 | struct i2c_client *client = to_i2c_client(dev); \ | 475 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -484,7 +483,7 @@ static ssize_t set_temp##offset##_max(struct device *dev, const char *buf, \ | |||
484 | up(&data->update_lock); \ | 483 | up(&data->update_lock); \ |
485 | return count; \ | 484 | return count; \ |
486 | } \ | 485 | } \ |
487 | static ssize_t set_temp##offset##_crit(struct device *dev, const char *buf, \ | 486 | static ssize_t set_temp##offset##_crit(struct device *dev, struct device_attribute *attr, const char *buf, \ |
488 | size_t count) \ | 487 | size_t count) \ |
489 | { \ | 488 | { \ |
490 | struct i2c_client *client = to_i2c_client(dev); \ | 489 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -512,19 +511,19 @@ show_and_set_therm(4) | |||
512 | show_and_set_therm(5) | 511 | show_and_set_therm(5) |
513 | show_and_set_therm(6) | 512 | show_and_set_therm(6) |
514 | 513 | ||
515 | static ssize_t show_vid(struct device *dev, char *buf) | 514 | static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf) |
516 | { | 515 | { |
517 | struct pc87360_data *data = pc87360_update_device(dev); | 516 | struct pc87360_data *data = pc87360_update_device(dev); |
518 | return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm)); | 517 | return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm)); |
519 | } | 518 | } |
520 | static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL); | 519 | static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL); |
521 | 520 | ||
522 | static ssize_t show_vrm(struct device *dev, char *buf) | 521 | static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf) |
523 | { | 522 | { |
524 | struct pc87360_data *data = pc87360_update_device(dev); | 523 | struct pc87360_data *data = pc87360_update_device(dev); |
525 | return sprintf(buf, "%u\n", data->vrm); | 524 | return sprintf(buf, "%u\n", data->vrm); |
526 | } | 525 | } |
527 | static ssize_t set_vrm(struct device *dev, const char *buf, size_t count) | 526 | static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
528 | { | 527 | { |
529 | struct i2c_client *client = to_i2c_client(dev); | 528 | struct i2c_client *client = to_i2c_client(dev); |
530 | struct pc87360_data *data = i2c_get_clientdata(client); | 529 | struct pc87360_data *data = i2c_get_clientdata(client); |
@@ -533,7 +532,7 @@ static ssize_t set_vrm(struct device *dev, const char *buf, size_t count) | |||
533 | } | 532 | } |
534 | static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm, set_vrm); | 533 | static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm, set_vrm); |
535 | 534 | ||
536 | static ssize_t show_in_alarms(struct device *dev, char *buf) | 535 | static ssize_t show_in_alarms(struct device *dev, struct device_attribute *attr, char *buf) |
537 | { | 536 | { |
538 | struct pc87360_data *data = pc87360_update_device(dev); | 537 | struct pc87360_data *data = pc87360_update_device(dev); |
539 | return sprintf(buf, "%u\n", data->in_alarms); | 538 | return sprintf(buf, "%u\n", data->in_alarms); |
@@ -541,32 +540,32 @@ static ssize_t show_in_alarms(struct device *dev, char *buf) | |||
541 | static DEVICE_ATTR(alarms_in, S_IRUGO, show_in_alarms, NULL); | 540 | static DEVICE_ATTR(alarms_in, S_IRUGO, show_in_alarms, NULL); |
542 | 541 | ||
543 | #define show_and_set_temp(offset) \ | 542 | #define show_and_set_temp(offset) \ |
544 | static ssize_t show_temp##offset##_input(struct device *dev, char *buf) \ | 543 | static ssize_t show_temp##offset##_input(struct device *dev, struct device_attribute *attr, char *buf) \ |
545 | { \ | 544 | { \ |
546 | struct pc87360_data *data = pc87360_update_device(dev); \ | 545 | struct pc87360_data *data = pc87360_update_device(dev); \ |
547 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[offset-1])); \ | 546 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[offset-1])); \ |
548 | } \ | 547 | } \ |
549 | static ssize_t show_temp##offset##_min(struct device *dev, char *buf) \ | 548 | static ssize_t show_temp##offset##_min(struct device *dev, struct device_attribute *attr, char *buf) \ |
550 | { \ | 549 | { \ |
551 | struct pc87360_data *data = pc87360_update_device(dev); \ | 550 | struct pc87360_data *data = pc87360_update_device(dev); \ |
552 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_min[offset-1])); \ | 551 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_min[offset-1])); \ |
553 | } \ | 552 | } \ |
554 | static ssize_t show_temp##offset##_max(struct device *dev, char *buf) \ | 553 | static ssize_t show_temp##offset##_max(struct device *dev, struct device_attribute *attr, char *buf) \ |
555 | { \ | 554 | { \ |
556 | struct pc87360_data *data = pc87360_update_device(dev); \ | 555 | struct pc87360_data *data = pc87360_update_device(dev); \ |
557 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[offset-1])); \ | 556 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[offset-1])); \ |
558 | }\ | 557 | }\ |
559 | static ssize_t show_temp##offset##_crit(struct device *dev, char *buf) \ | 558 | static ssize_t show_temp##offset##_crit(struct device *dev, struct device_attribute *attr, char *buf) \ |
560 | { \ | 559 | { \ |
561 | struct pc87360_data *data = pc87360_update_device(dev); \ | 560 | struct pc87360_data *data = pc87360_update_device(dev); \ |
562 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_crit[offset-1])); \ | 561 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_crit[offset-1])); \ |
563 | }\ | 562 | }\ |
564 | static ssize_t show_temp##offset##_status(struct device *dev, char *buf) \ | 563 | static ssize_t show_temp##offset##_status(struct device *dev, struct device_attribute *attr, char *buf) \ |
565 | { \ | 564 | { \ |
566 | struct pc87360_data *data = pc87360_update_device(dev); \ | 565 | struct pc87360_data *data = pc87360_update_device(dev); \ |
567 | return sprintf(buf, "%d\n", data->temp_status[offset-1]); \ | 566 | return sprintf(buf, "%d\n", data->temp_status[offset-1]); \ |
568 | }\ | 567 | }\ |
569 | static ssize_t set_temp##offset##_min(struct device *dev, const char *buf, \ | 568 | static ssize_t set_temp##offset##_min(struct device *dev, struct device_attribute *attr, const char *buf, \ |
570 | size_t count) \ | 569 | size_t count) \ |
571 | { \ | 570 | { \ |
572 | struct i2c_client *client = to_i2c_client(dev); \ | 571 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -580,7 +579,7 @@ static ssize_t set_temp##offset##_min(struct device *dev, const char *buf, \ | |||
580 | up(&data->update_lock); \ | 579 | up(&data->update_lock); \ |
581 | return count; \ | 580 | return count; \ |
582 | } \ | 581 | } \ |
583 | static ssize_t set_temp##offset##_max(struct device *dev, const char *buf, \ | 582 | static ssize_t set_temp##offset##_max(struct device *dev, struct device_attribute *attr, const char *buf, \ |
584 | size_t count) \ | 583 | size_t count) \ |
585 | { \ | 584 | { \ |
586 | struct i2c_client *client = to_i2c_client(dev); \ | 585 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -594,7 +593,7 @@ static ssize_t set_temp##offset##_max(struct device *dev, const char *buf, \ | |||
594 | up(&data->update_lock); \ | 593 | up(&data->update_lock); \ |
595 | return count; \ | 594 | return count; \ |
596 | } \ | 595 | } \ |
597 | static ssize_t set_temp##offset##_crit(struct device *dev, const char *buf, \ | 596 | static ssize_t set_temp##offset##_crit(struct device *dev, struct device_attribute *attr, const char *buf, \ |
598 | size_t count) \ | 597 | size_t count) \ |
599 | { \ | 598 | { \ |
600 | struct i2c_client *client = to_i2c_client(dev); \ | 599 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -622,7 +621,7 @@ show_and_set_temp(1) | |||
622 | show_and_set_temp(2) | 621 | show_and_set_temp(2) |
623 | show_and_set_temp(3) | 622 | show_and_set_temp(3) |
624 | 623 | ||
625 | static ssize_t show_temp_alarms(struct device *dev, char *buf) | 624 | static ssize_t show_temp_alarms(struct device *dev, struct device_attribute *attr, char *buf) |
626 | { | 625 | { |
627 | struct pc87360_data *data = pc87360_update_device(dev); | 626 | struct pc87360_data *data = pc87360_update_device(dev); |
628 | return sprintf(buf, "%u\n", data->temp_alarms); | 627 | return sprintf(buf, "%u\n", data->temp_alarms); |