https://bugzilla.kernel.org/show_bug.cgi?id=15548





--- Comment #8 from Sergey Senozhatsky <[email protected]>  
2010-03-22 13:55:25 ---
On (03/22/10 06:39), [email protected] wrote:
> --- Comment #4 from Wolfram Sang <[email protected]>  2010-03-22 06:38:55 
> ---
> Can you try this patch?
> 
> https://patchwork.kernel.org/patch/87359/
> 

Sorry, copy-paste from mail sent to the list.

***

Nope. Sorry, I didn't test carefully. Oh, Monday...
Proposed patch doesn't fix the problem. The gives below
patch does.

Note that thermal_zone_bind_cooling_device part was proposed by 
Wolfram Sang here:
https://patchwork.kernel.org/patch/87359/

So, Wolfram, we need to cooperate to solve the problem.

Initialize sysfs attributes before device_create_file call.

Signed-off-by: Sergey Senozhatsky <[email protected]>
---

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 5066de5..ecb181d 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -505,6 +505,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 +518,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)
@@ -725,6 +727,7 @@ int thermal_zone_bind_cooling_device(struct
thermal_zone_device *tz,
         goto release_idr;

     sprintf(dev->attr_name, "cdev%d_trip_point", dev->id);
+    sysfs_attr_init(&dev->attr.attr);
     dev->attr.attr.name = dev->attr_name;
     dev->attr.attr.mode = 0444;
     dev->attr.show = thermal_cooling_device_trip_point_show;

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
acpi-bugzilla mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to