mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] regulator: fixed: Init gpio properly
@ 2016-02-16 11:18 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2016-02-16 11:18 UTC (permalink / raw)
  To: Barebox List

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>
---
 drivers/regulator/fixed.c | 1 +
 1 file changed, 1 insertion(+)

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);
-- 
2.7.0.rc3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-16 11:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16 11:18 [PATCH] regulator: fixed: Init gpio properly Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox