dect
/
linux-2.6
Archived
13
0
Fork 0

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:
Ameya Palande 2010-03-12 20:09:01 +02:00 committed by Liam Girdwood
parent 67e46f347e
commit 4f26a2abe1
1 changed files with 1 additions and 0 deletions

View File

@ -1038,6 +1038,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
goto overflow_err;
regulator->dev = dev;
sysfs_attr_init(&regulator->dev_attr.attr);
regulator->dev_attr.attr.name = kstrdup(buf, GFP_KERNEL);
if (regulator->dev_attr.attr.name == NULL)
goto attr_name_err;