diff options
author | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | 2010-04-06 17:34:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-07 11:38:03 -0400 |
commit | 975f8c5653acba461229e671202113da69b87be1 (patch) | |
tree | 8355328258d13e7e0182cc24a241b42b3f1e528c /drivers/thermal/thermal_sys.c | |
parent | 829f46af39d50a43e260adaa9e7bbdff74a9f696 (diff) |
drivers/thermal/thermal_sys.c: fix 'key f70f4b50 not in .data' in thermal_sys
Initialize sysfs attributes before device_create_file call.
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=15548
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Greg KH <gregkh@suse.de>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/thermal/thermal_sys.c')
-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; |