[PATCH] regulator: core: use correct device for device supply lookup

From: Laxman Dewangan
Date: Sat May 19 2012 - 10:19:18 EST


When registering the regulator driver, use the rdev->dev for
getting the regulator device of given supply instead of parent
device.

Signed-off-by: Laxman Dewangan <ldewangan@xxxxxxxxxx>
---
drivers/regulator/core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 7584a74..f820137 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3150,7 +3150,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
if (supply) {
struct regulator_dev *r;

- r = regulator_dev_lookup(dev, supply, &ret);
+ r = regulator_dev_lookup(&rdev->dev, supply, &ret);

if (!r) {
dev_err(dev, "Failed to find supply %s\n", supply);
--
1.7.1.1

--
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/