diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-09 22:42:57 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-09 22:42:57 -0500 |
commit | a8bfb69e77591c4811acbf30618cc07db9c001fc (patch) | |
tree | 1c7526e62c0ff9097bf4c056547fdd9c2af343fa /drivers/regulator/lp8788-buck.c | |
parent | bdb7e45507893f4c509c539d442ed4962ac6fa0f (diff) | |
parent | 131a5b9d82f802e8e0320e81abf38ed2781bb35a (diff) |
Merge remote-tracking branch 'regulator/topic/lp8788' into regulator-next
Diffstat (limited to 'drivers/regulator/lp8788-buck.c')
-rw-r--r-- | drivers/regulator/lp8788-buck.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c index 6cc02c35ddb5..aef3f2b0c5ea 100644 --- a/drivers/regulator/lp8788-buck.c +++ b/drivers/regulator/lp8788-buck.c | |||
@@ -429,18 +429,6 @@ static struct regulator_desc lp8788_buck_desc[] = { | |||
429 | }, | 429 | }, |
430 | }; | 430 | }; |
431 | 431 | ||
432 | static int _gpio_request(struct lp8788_buck *buck, int gpio, char *name) | ||
433 | { | ||
434 | struct device *dev = buck->lp->dev; | ||
435 | |||
436 | if (!gpio_is_valid(gpio)) { | ||
437 | dev_err(dev, "invalid gpio: %d\n", gpio); | ||
438 | return -EINVAL; | ||
439 | } | ||
440 | |||
441 | return devm_gpio_request_one(dev, gpio, DVS_LOW, name); | ||
442 | } | ||
443 | |||
444 | static int lp8788_dvs_gpio_request(struct lp8788_buck *buck, | 432 | static int lp8788_dvs_gpio_request(struct lp8788_buck *buck, |
445 | enum lp8788_buck_id id) | 433 | enum lp8788_buck_id id) |
446 | { | 434 | { |
@@ -452,7 +440,8 @@ static int lp8788_dvs_gpio_request(struct lp8788_buck *buck, | |||
452 | switch (id) { | 440 | switch (id) { |
453 | case BUCK1: | 441 | case BUCK1: |
454 | gpio = pdata->buck1_dvs->gpio; | 442 | gpio = pdata->buck1_dvs->gpio; |
455 | ret = _gpio_request(buck, gpio, b1_name); | 443 | ret = devm_gpio_request_one(buck->lp->dev, gpio, DVS_LOW, |
444 | b1_name); | ||
456 | if (ret) | 445 | if (ret) |
457 | return ret; | 446 | return ret; |
458 | 447 | ||
@@ -461,7 +450,8 @@ static int lp8788_dvs_gpio_request(struct lp8788_buck *buck, | |||
461 | case BUCK2: | 450 | case BUCK2: |
462 | for (i = 0 ; i < LP8788_NUM_BUCK2_DVS ; i++) { | 451 | for (i = 0 ; i < LP8788_NUM_BUCK2_DVS ; i++) { |
463 | gpio = pdata->buck2_dvs->gpio[i]; | 452 | gpio = pdata->buck2_dvs->gpio[i]; |
464 | ret = _gpio_request(buck, gpio, b2_name[i]); | 453 | ret = devm_gpio_request_one(buck->lp->dev, gpio, |
454 | DVS_LOW, b2_name[i]); | ||
465 | if (ret) | 455 | if (ret) |
466 | return ret; | 456 | return ret; |
467 | } | 457 | } |