lkml.org 
[lkml]   [2010]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] thermal: make lockdep happy
From
Date
On Thu, 2010-04-01 at 01:09 +0800, Dan Carpenter wrote:
> Hi Christian,
>
> Can you test this patch?
>
> I wrote this to address bugzilla bug:
> https://bugzilla.kernel.org/show_bug.cgi?id=15504
> BUG: key ffff88004c3811e0 not in .data! occured in lockdep.c
>
> We now have to call sysfs_attr_init() for dynamically allocated sysfs
> attributes or lockdep complains.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>

>
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index 5066de5..d4fec47 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -725,6 +725,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;




\
 
 \ /
  Last update: 2010-04-01 03:45    [W:0.065 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site