diff options
Diffstat (limited to 'drivers/thermal/thermal_sys.c')
-rw-r--r-- | drivers/thermal/thermal_sys.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 5066de5cfc0c..13c72c629329 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/kdev_t.h> | 30 | #include <linux/kdev_t.h> |
30 | #include <linux/idr.h> | 31 | #include <linux/idr.h> |
31 | #include <linux/thermal.h> | 32 | #include <linux/thermal.h> |
@@ -505,6 +506,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) | |||
505 | tz->temp_input.attr.attr.name = tz->temp_input.name; | 506 | tz->temp_input.attr.attr.name = tz->temp_input.name; |
506 | tz->temp_input.attr.attr.mode = 0444; | 507 | tz->temp_input.attr.attr.mode = 0444; |
507 | 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); | ||
508 | result = device_create_file(hwmon->device, &tz->temp_input.attr); | 510 | result = device_create_file(hwmon->device, &tz->temp_input.attr); |
509 | if (result) | 511 | if (result) |
510 | goto unregister_hwmon_device; | 512 | goto unregister_hwmon_device; |
@@ -517,6 +519,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) | |||
517 | tz->temp_crit.attr.attr.name = tz->temp_crit.name; | 519 | tz->temp_crit.attr.attr.name = tz->temp_crit.name; |
518 | tz->temp_crit.attr.attr.mode = 0444; | 520 | tz->temp_crit.attr.attr.mode = 0444; |
519 | 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); | ||
520 | result = device_create_file(hwmon->device, | 523 | result = device_create_file(hwmon->device, |
521 | &tz->temp_crit.attr); | 524 | &tz->temp_crit.attr); |
522 | if (result) | 525 | if (result) |
@@ -725,6 +728,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, | |||
725 | goto release_idr; | 728 | goto release_idr; |
726 | 729 | ||
727 | 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); | ||
728 | dev->attr.attr.name = dev->attr_name; | 732 | dev->attr.attr.name = dev->attr_name; |
729 | dev->attr.attr.mode = 0444; | 733 | dev->attr.attr.mode = 0444; |
730 | dev->attr.show = thermal_cooling_device_trip_point_show; | 734 | dev->attr.show = thermal_cooling_device_trip_point_show; |