From 501f82d2ca4f7f73418b68271f514eae71f34fe2 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Sat, 29 Jan 2011 16:58:19 +0530 Subject: arm: regulator: gpio_switch: Returning proper enable states Returning proper enable states when the supply of the rail is not enabled. Original-Change-Id: Ibb707790b03b1af7e3c305c6dba3a28914ed22b2 Reviewed-on: http://git-master/r/17569 Reviewed-by: Venkata Nageswara Penumarty Tested-by: Venkata Nageswara Penumarty Reviewed-by: Laxman Dewangan Tested-by: Laxman Dewangan Change-Id: I5e072d19d6cf5f2e5ab4f647e75715fb796673c7 --- drivers/regulator/gpio-switch-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator') diff --git a/drivers/regulator/gpio-switch-regulator.c b/drivers/regulator/gpio-switch-regulator.c index 6babb6c2fb0e..6b4d565b3bf7 100755 --- a/drivers/regulator/gpio-switch-regulator.c +++ b/drivers/regulator/gpio-switch-regulator.c @@ -142,7 +142,7 @@ static int gpio_switch_regulator_is_enabled(struct regulator_dev *rdev) if (ri->input_regulator) { ret = regulator_is_enabled(ri->input_regulator); if (!ret) - return !ret; + return ret; } return (ri->is_enable) ? 1 : 0; } -- cgit v1.2.3