diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-07 13:18:45 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-07 13:23:44 -0400 |
commit | 09e3fd202df67ec5d6d9a04c05b58c7367580226 (patch) | |
tree | 165d5b1ba6d9d6039e61e931ea9d9a37d2d27adf /drivers/regulator/wm8994-regulator.c | |
parent | a60cfce051dd5e22329df1018d278bf3e52d82bc (diff) |
regulator: wm8994: Convert to gpio_request_one()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/wm8994-regulator.c')
-rw-r--r-- | drivers/regulator/wm8994-regulator.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c index 0ee81e1b6463..1f7f43cfc2d1 100644 --- a/drivers/regulator/wm8994-regulator.c +++ b/drivers/regulator/wm8994-regulator.c | |||
@@ -224,19 +224,12 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev) | |||
224 | if (pdata->ldo[id].enable && gpio_is_valid(pdata->ldo[id].enable)) { | 224 | if (pdata->ldo[id].enable && gpio_is_valid(pdata->ldo[id].enable)) { |
225 | ldo->enable = pdata->ldo[id].enable; | 225 | ldo->enable = pdata->ldo[id].enable; |
226 | 226 | ||
227 | ret = gpio_request(ldo->enable, "WM8994 LDO enable"); | 227 | ret = gpio_request_one(ldo->enable, 0, "WM8994 LDO enable"); |
228 | if (ret < 0) { | 228 | if (ret < 0) { |
229 | dev_err(&pdev->dev, "Failed to get enable GPIO: %d\n", | 229 | dev_err(&pdev->dev, "Failed to get enable GPIO: %d\n", |
230 | ret); | 230 | ret); |
231 | goto err; | 231 | goto err; |
232 | } | 232 | } |
233 | |||
234 | ret = gpio_direction_output(ldo->enable, ldo->is_enabled); | ||
235 | if (ret < 0) { | ||
236 | dev_err(&pdev->dev, "Failed to set GPIO up: %d\n", | ||
237 | ret); | ||
238 | goto err_gpio; | ||
239 | } | ||
240 | } else | 233 | } else |
241 | ldo->is_enabled = true; | 234 | ldo->is_enabled = true; |
242 | 235 | ||