diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-10 04:42:57 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-10 04:42:57 +0100 |
commit | a8bfb69e77591c4811acbf30618cc07db9c001fc (patch) | |
tree | 1c7526e62c0ff9097bf4c056547fdd9c2af343fa /drivers/regulator/lp8788-buck.c | |
parent | Merge remote-tracking branch 'regulator/topic/log' into regulator-next (diff) | |
parent | regulator: lp8788-buck: Kill _gpio_request function (diff) | |
download | linux-a8bfb69e77591c4811acbf30618cc07db9c001fc.tar.xz linux-a8bfb69e77591c4811acbf30618cc07db9c001fc.zip |
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[] = { }, }; -static int _gpio_request(struct lp8788_buck *buck, int gpio, char *name) -{ - struct device *dev = buck->lp->dev; - - if (!gpio_is_valid(gpio)) { - dev_err(dev, "invalid gpio: %d\n", gpio); - return -EINVAL; - } - - return devm_gpio_request_one(dev, gpio, DVS_LOW, name); -} - static int lp8788_dvs_gpio_request(struct lp8788_buck *buck, enum lp8788_buck_id id) { @@ -452,7 +440,8 @@ static int lp8788_dvs_gpio_request(struct lp8788_buck *buck, switch (id) { case BUCK1: gpio = pdata->buck1_dvs->gpio; - ret = _gpio_request(buck, gpio, b1_name); + ret = devm_gpio_request_one(buck->lp->dev, gpio, DVS_LOW, + b1_name); if (ret) return ret; @@ -461,7 +450,8 @@ static int lp8788_dvs_gpio_request(struct lp8788_buck *buck, case BUCK2: for (i = 0 ; i < LP8788_NUM_BUCK2_DVS ; i++) { gpio = pdata->buck2_dvs->gpio[i]; - ret = _gpio_request(buck, gpio, b2_name[i]); + ret = devm_gpio_request_one(buck->lp->dev, gpio, + DVS_LOW, b2_name[i]); if (ret) return ret; } |