summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-02-16 12:18:07 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-02-23 08:05:39 +0100
commit4c24879f6a7cb6d021fa0d23340dffb69014d474 (patch)
treecee9bbf9d855bea3b9f173313dd32b4e2d8102a1 /drivers/regulator
parentf1f8f5556ab94f4f8bedb97ad0199b2e63958c8b (diff)
downloadbarebox-4c24879f6a7cb6d021fa0d23340dffb69014d474.tar.gz
regulator: fixed: Init gpio properly
gpio has to be initialized with an invalid gpio number. 0 is a valid number and it will be requested and used by the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/fixed.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 2515d3e..87554d2 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -69,6 +69,7 @@ static int regulator_fixed_probe(struct device_d *dev)
return -EINVAL;
fix = xzalloc(sizeof(*fix));
+ fix->gpio = -EINVAL;
if (of_get_property(dev->device_node, "gpio", NULL)) {
fix->gpio = of_get_named_gpio_flags(dev->device_node, "gpio", 0, &gpioflags);