From 26cbd3073394b966654294c8cb9cb2fec870c567 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 16 Nov 2012 00:35:14 +0800 Subject: [PATCH] regulator: da9055: Fix checking wrong value in da9055_gpio_init Check pdata->gpio_rsel && pdata->gpio_rsel[id] for the case GPI pin is muxed with regulator to select the regulator register set A/B for voltage ramping. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- drivers/regulator/da9055-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c index 8994178b371c..79c56655b9b3 100644 --- a/drivers/regulator/da9055-regulator.c +++ b/drivers/regulator/da9055-regulator.c @@ -501,7 +501,7 @@ static __devinit int da9055_gpio_init(struct da9055_regulator *regulator, goto err; } - if (pdata->gpio_rsel && pdata->gpio_ren[id]) { + if (pdata->gpio_rsel && pdata->gpio_rsel[id]) { char name[18]; int gpio_mux = pdata->gpio_rsel[id]; -- 2.34.1