lkml.org 
[lkml]   [2010]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: Get rid of lockdep warning
On Fri, Mar 12, 2010 at 07:16:36PM +0200, Ameya Palande wrote:

> @@ -1045,6 +1045,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
> regulator->dev_attr.attr.owner = THIS_MODULE;
> regulator->dev_attr.attr.mode = 0444;
> regulator->dev_attr.show = device_requested_uA_show;
> + sysfs_attr_init(&regulator->dev_attr.attr);
> err = device_create_file(dev, &regulator->dev_attr);
> if (err < 0) {
> printk(KERN_WARNING "%s: could not add regulator_dev"

Without having looked at what sysfs_attr_init() is actually doing it
looks odd to be calling an init() function after having initialised
several members of the structure - I'd expect to see the call happen
before we start writing stuff in?


\
 
 \ /
  Last update: 2010-03-12 18:25    [W:1.143 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site