diff options
-rw-r--r-- | drivers/thermal/thermal_sys.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 9b6297f07b83..13c72c629329 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c | |||
@@ -506,6 +506,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) | |||
506 | tz->temp_input.attr.attr.name = tz->temp_input.name; | 506 | tz->temp_input.attr.attr.name = tz->temp_input.name; |
507 | tz->temp_input.attr.attr.mode = 0444; | 507 | tz->temp_input.attr.attr.mode = 0444; |
508 | tz->temp_input.attr.show = temp_input_show; | 508 | tz->temp_input.attr.show = temp_input_show; |
509 | sysfs_attr_init(&tz->temp_input.attr.attr); | ||
509 | result = device_create_file(hwmon->device, &tz->temp_input.attr); | 510 | result = device_create_file(hwmon->device, &tz->temp_input.attr); |
510 | if (result) | 511 | if (result) |
511 | goto unregister_hwmon_device; | 512 | goto unregister_hwmon_device; |
@@ -518,6 +519,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) | |||
518 | tz->temp_crit.attr.attr.name = tz->temp_crit.name; | 519 | tz->temp_crit.attr.attr.name = tz->temp_crit.name; |
519 | tz->temp_crit.attr.attr.mode = 0444; | 520 | tz->temp_crit.attr.attr.mode = 0444; |
520 | tz->temp_crit.attr.show = temp_crit_show; | 521 | tz->temp_crit.attr.show = temp_crit_show; |
522 | sysfs_attr_init(&tz->temp_crit.attr.attr); | ||
521 | result = device_create_file(hwmon->device, | 523 | result = device_create_file(hwmon->device, |
522 | &tz->temp_crit.attr); | 524 | &tz->temp_crit.attr); |
523 | if (result) | 525 | if (result) |
@@ -726,6 +728,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, | |||
726 | goto release_idr; | 728 | goto release_idr; |
727 | 729 | ||
728 | sprintf(dev->attr_name, "cdev%d_trip_point", dev->id); | 730 | sprintf(dev->attr_name, "cdev%d_trip_point", dev->id); |
731 | sysfs_attr_init(&dev->attr.attr); | ||
729 | dev->attr.attr.name = dev->attr_name; | 732 | dev->attr.attr.name = dev->attr_name; |
730 | dev->attr.attr.mode = 0444; | 733 | dev->attr.attr.mode = 0444; |
731 | dev->attr.show = thermal_cooling_device_trip_point_show; | 734 | dev->attr.show = thermal_cooling_device_trip_point_show; |