[PATCH] regulator: Get rid of lockdep warning
From: Ameya Palande
Date: Fri Mar 12 2010 - 12:18:15 EST
From: Ameya Palande <ameya.palande@xxxxxxxxx>
WARNING: at kernel/lockdep.c:2706 sysfs_add_file_mode+0x4c/0xa8()
Signed-off-by: Ameya Palande <ameya.palande@xxxxxxxxx>
CC: Liam Girdwood <lrg@xxxxxxxxxxxxxxx>
CC: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
CC: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
---
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 c7bbe30..2ad3272 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -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(®ulator->dev_attr.attr);
err = device_create_file(dev, ®ulator->dev_attr);
if (err < 0) {
printk(KERN_WARNING "%s: could not add regulator_dev"
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/