diff options
author | Lee Jones <lee.jones@linaro.org> | 2012-12-10 03:55:53 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-10 09:12:41 -0500 |
commit | 3708903ee60b1b89cbeee00cbc76e9fdbcbbed2e (patch) | |
tree | 88fc1702d7545db8aa84e6db2da5c166a599404e /drivers/regulator/gpio-regulator.c | |
parent | ad0b8b9e82b63ad2cc5e6822448adc897f49a5c4 (diff) |
regulator: gpio-regulator: gpio_set_value should use cansleep
If it's possible for gpio_set_value to sleep, we should be using
the *_cansleep call instead. This patch fixes multiple warnings
from gpiolib.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/gpio-regulator.c')
-rw-r--r-- | drivers/regulator/gpio-regulator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 84e585fca795..9f40b0df68cb 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 | ||