summaryrefslogtreecommitdiff
path: root/drivers/regulator/gpio-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-10 18:14:11 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-10 18:14:11 +0400
commitbfd9155ebbdd4ea3d14b5d1ee933a893bbe0618f (patch)
tree7f8dde669316529d6bcd9d4117f49c35c2b6094e /drivers/regulator/gpio-regulator.c
parent925f14dc2da122eabc809ce738098abaaa9f285c (diff)
parent3708903ee60b1b89cbeee00cbc76e9fdbcbbed2e (diff)
downloadlinux-bfd9155ebbdd4ea3d14b5d1ee933a893bbe0618f.tar.xz
Merge remote-tracking branch 'regulator/topic/gpio' into regulator-next
Diffstat (limited to 'drivers/regulator/gpio-regulator.c')
-rw-r--r--drivers/regulator/gpio-regulator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 2cfd9d3079e8..8ae288fc150b 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -82,7 +82,7 @@ static int gpio_regulator_set_voltage(struct regulator_dev *dev,
for (ptr = 0; ptr < data->nr_gpios; ptr++) {
state = (target & (1 << ptr)) >> ptr;
- gpio_set_value(data->gpios[ptr].gpio, state);
+ gpio_set_value_cansleep(data->gpios[ptr].gpio, state);
}
data->state = target;
@@ -119,7 +119,7 @@ static int gpio_regulator_set_current_limit(struct regulator_dev *dev,
for (ptr = 0; ptr < data->nr_gpios; ptr++) {
state = (target & (1 << ptr)) >> ptr;
- gpio_set_value(data->gpios[ptr].gpio, state);
+ gpio_set_value_cansleep(data->gpios[ptr].gpio, state);
}
data->state = target;
@@ -174,7 +174,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
if (!config->gpios)
return ERR_PTR(-ENOMEM);
- for (i = 0; config->nr_gpios; i++) {
+ for (i = 0; i < config->nr_gpios; i++) {
gpio = of_get_named_gpio(np, "gpios", i);
if (gpio < 0)
break;