diff options
author | Frank Li <Frank.Li@freescale.com> | 2012-11-12 04:59:52 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-13 02:35:57 -0500 |
commit | f8a9f757cb425c4784b80b001c7a77c7810b499f (patch) | |
tree | 3be3134fc9e358b2c381498b5d9422b9b8717434 | |
parent | dea05fe66edb4540a53ed6623794c4978315256a (diff) |
regulator: gpio-regulator: fix can't find regulator node in dt
Need initilize of_node in regulator config when register regulator,
otherwise regulator driver think it is no-dt device.
in regulator_dev_lookup
list_for_each_entry(r, ®ulator_list, list)
if (r->dev.parent &&
node == r->dev.of_node)
return r
r->dev.of_noe will be zero if miss config in cfg.
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | drivers/regulator/gpio-regulator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index e467d0ac8705..faa2f712eb0d 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c | |||
@@ -303,6 +303,7 @@ static int __devinit gpio_regulator_probe(struct platform_device *pdev) | |||
303 | cfg.dev = &pdev->dev; | 303 | cfg.dev = &pdev->dev; |
304 | cfg.init_data = config->init_data; | 304 | cfg.init_data = config->init_data; |
305 | cfg.driver_data = drvdata; | 305 | cfg.driver_data = drvdata; |
306 | cfg.of_node = np; | ||
306 | 307 | ||
307 | if (config->enable_gpio >= 0) | 308 | if (config->enable_gpio >= 0) |
308 | cfg.ena_gpio = config->enable_gpio; | 309 | cfg.ena_gpio = config->enable_gpio; |