diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-10 09:14:11 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-10 09:14:11 -0500 |
commit | bfd9155ebbdd4ea3d14b5d1ee933a893bbe0618f (patch) | |
tree | 7f8dde669316529d6bcd9d4117f49c35c2b6094e /drivers/regulator | |
parent | 925f14dc2da122eabc809ce738098abaaa9f285c (diff) | |
parent | 3708903ee60b1b89cbeee00cbc76e9fdbcbbed2e (diff) |
Merge remote-tracking branch 'regulator/topic/gpio' into regulator-next
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/gpio-regulator.c | 6 |
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, | |||
82 | 82 | ||
83 | for (ptr = 0; ptr < data->nr_gpios; ptr++) { | 83 | for (ptr = 0; ptr < data->nr_gpios; ptr++) { |
84 | state = (target & (1 << ptr)) >> ptr; | 84 | state = (target & (1 << ptr)) >> ptr; |
85 | gpio_set_value(data->gpios[ptr].gpio, state); | 85 | gpio_set_value_cansleep(data->gpios[ptr].gpio, state); |
86 | } | 86 | } |
87 | data->state = target; | 87 | data->state = target; |
88 | 88 | ||
@@ -119,7 +119,7 @@ static int gpio_regulator_set_current_limit(struct regulator_dev *dev, | |||
119 | 119 | ||
120 | for (ptr = 0; ptr < data->nr_gpios; ptr++) { | 120 | for (ptr = 0; ptr < data->nr_gpios; ptr++) { |
121 | state = (target & (1 << ptr)) >> ptr; | 121 | state = (target & (1 << ptr)) >> ptr; |
122 | gpio_set_value(data->gpios[ptr].gpio, state); | 122 | gpio_set_value_cansleep(data->gpios[ptr].gpio, state); |
123 | } | 123 | } |
124 | data->state = target; | 124 | data->state = target; |
125 | 125 | ||
@@ -174,7 +174,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np) | |||
174 | if (!config->gpios) | 174 | if (!config->gpios) |
175 | return ERR_PTR(-ENOMEM); | 175 | return ERR_PTR(-ENOMEM); |
176 | 176 | ||
177 | for (i = 0; config->nr_gpios; i++) { | 177 | for (i = 0; i < config->nr_gpios; i++) { |
178 | gpio = of_get_named_gpio(np, "gpios", i); | 178 | gpio = of_get_named_gpio(np, "gpios", i); |
179 | if (gpio < 0) | 179 | if (gpio < 0) |
180 | break; | 180 | break; |