diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2014-11-03 19:12:04 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-07 11:30:25 +0000 |
commit | 1de3821ace8200432993821bfda043827029de2a (patch) | |
tree | 0cbde00f92a160441e1d9928cbbc26e856d0b371 /drivers/regulator/gpio-regulator.c | |
parent | 76f439df50aba1838e06dd01e5f20dada7473f57 (diff) | |
download | linux-1de3821ace8200432993821bfda043827029de2a.tar.gz linux-1de3821ace8200432993821bfda043827029de2a.tar.bz2 linux-1de3821ace8200432993821bfda043827029de2a.zip |
regulator: Set ena_gpio_initialized in regulator drivers
This patch sets ena_gpio_initialized for all drivers which set a
ena_gpio from parsed DT properties. Drivers using pdata may get zero
initialized pdata and therefore copy a 0 into the regulator_config
ena_gpio field.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/gpio-regulator.c')
-rw-r--r-- | drivers/regulator/gpio-regulator.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 989b23b377c0..5da0125fac6a 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -322,8 +322,10 @@ static int gpio_regulator_probe(struct platform_device *pdev) cfg.driver_data = drvdata; cfg.of_node = np; - if (config->enable_gpio >= 0) + if (config->enable_gpio >= 0) { cfg.ena_gpio = config->enable_gpio; + cfg.ena_gpio_initialized = true; + } cfg.ena_gpio_invert = !config->enable_high; if (config->enabled_at_boot) { if (config->enable_high) |