From: Mark Brown Date: Tue, 24 May 2011 15:14:40 +0000 (+0800) Subject: regulator: Use _cansleep() for WM8994 regulator GPIOs X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2ae3636b79aee1a69b2e84eff68bb123090796d3;p=linux-beck.git regulator: Use _cansleep() for WM8994 regulator GPIOs The WM8994 regulator driver is perfectly happy if the GPIO used to enable the regulator sleeps so call the appropriate GPIO API. Signed-off-by: Mark Brown Signed-off-by: Liam Girdwood --- diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c index 35b2958d5106..1a6a690f24db 100644 --- a/drivers/regulator/wm8994-regulator.c +++ b/drivers/regulator/wm8994-regulator.c @@ -43,7 +43,7 @@ static int wm8994_ldo_enable(struct regulator_dev *rdev) if (!ldo->enable) return 0; - gpio_set_value(ldo->enable, 1); + gpio_set_value_cansleep(ldo->enable, 1); ldo->is_enabled = true; return 0; @@ -57,7 +57,7 @@ static int wm8994_ldo_disable(struct regulator_dev *rdev) if (!ldo->enable) return -EINVAL; - gpio_set_value(ldo->enable, 0); + gpio_set_value_cansleep(ldo->enable, 0); ldo->is_enabled = false; return 0;