diff options
author | Ameya Palande <ameya.palande@nokia.com> | 2010-03-12 13:09:01 -0500 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-03-22 15:44:44 -0400 |
commit | 4f26a2abe1eed18dc6adddf2d0ae5553e51578c2 (patch) | |
tree | b390fb19f6f2b7583ba4f93451d20fc4e34e9958 | |
parent | 67e46f347eb25222e2b415540b6ba3fd2574afe2 (diff) |
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>
-rw-r--r-- | drivers/regulator/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index c7bbe30010f7..5af16c2bb540 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1038,6 +1038,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, | |||
1038 | goto overflow_err; | 1038 | goto overflow_err; |
1039 | 1039 | ||
1040 | regulator->dev = dev; | 1040 | regulator->dev = dev; |
1041 | sysfs_attr_init(®ulator->dev_attr.attr); | ||
1041 | regulator->dev_attr.attr.name = kstrdup(buf, GFP_KERNEL); | 1042 | regulator->dev_attr.attr.name = kstrdup(buf, GFP_KERNEL); |
1042 | if (regulator->dev_attr.attr.name == NULL) | 1043 | if (regulator->dev_attr.attr.name == NULL) |
1043 | goto attr_name_err; | 1044 | goto attr_name_err; |