lkml.org 
[lkml]   [2010]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix key f70f4b50 not in .data in thermal_sys
Initialize sysfs attributes before device_create_file call.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 5066de5..a76a6ff 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -492,6 +492,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
goto free_mem;
}
dev_set_drvdata(hwmon->device, hwmon);
+ sysfs_attr_init(&dev_attr_name.attr);
result = device_create_file(hwmon->device, &dev_attr_name);
if (result)
goto unregister_hwmon_device;
@@ -505,6 +506,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
tz->temp_input.attr.attr.name = tz->temp_input.name;
tz->temp_input.attr.attr.mode = 0444;
tz->temp_input.attr.show = temp_input_show;
+ sysfs_attr_init(&tz->temp_input.attr.attr);
result = device_create_file(hwmon->device, &tz->temp_input.attr);
if (result)
goto unregister_hwmon_device;
@@ -517,6 +519,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
tz->temp_crit.attr.attr.name = tz->temp_crit.name;
tz->temp_crit.attr.attr.mode = 0444;
tz->temp_crit.attr.show = temp_crit_show;
+ sysfs_attr_init(&tz->temp_crit.attr.attr);
result = device_create_file(hwmon->device,
&tz->temp_crit.attr);
if (result)[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2010-03-22 14:17    [W:2.123 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site