regulator: Get rid of lockdep warning
WARNING: at kernel/lockdep.c:2706 sysfs_add_file_mode+0x4c/0xa8() Difference between v1 and v2: Moved sysfs_attr_init() call as first one to access the structure. Signed-off-by: Ameya Palande <ameya.palande@nokia.com> CC: Liam Girdwood <lrg@slimlogic.co.uk> CC: Mark Brown <broonie@opensource.wolfsonmicro.com> CC: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
parent
67e46f347e
commit
4f26a2abe1
@ -1038,6 +1038,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
|
||||
goto overflow_err;
|
||||
|
||||
regulator->dev = dev;
|
||||
sysfs_attr_init(®ulator->dev_attr.attr);
|
||||
regulator->dev_attr.attr.name = kstrdup(buf, GFP_KERNEL);
|
||||
if (regulator->dev_attr.attr.name == NULL)
|
||||
goto attr_name_err;
|
||||
|
Loading…
Reference in New Issue
Block a user