Skip to contentSkip to conversation

regulator: da9055: Fix checking wrong value in da9055_gpio_init

PATCH Applied Axel Lin 2 participants 2 messages Nov 15, 2012 – Nov 16, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 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.

---
Hi Ashish,
I'm wondering if this is a typo or I misunderstand the code. Axel

 drivers/regulator/da9055-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/da9055-regulator.c +1 -1
index 8994178..79c5665 100644
@@ -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];
 
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 2 lines · Axel Lin

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.

Applied, thanks. Can revert if it's not a good fix.