Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350428
b: refs/heads/master
c: 38d8f67
h: refs/heads/master
v: v3
  • Loading branch information
Kim, Milo authored and Mark Brown committed Jan 3, 2013
1 parent fe3c7db commit 436d0a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b0e8f128190982e2a8872e208723de09538e36b
refs/heads/master: 38d8f67cb6f6d40dd9473a972ec65b3d54a785dd
14 changes: 8 additions & 6 deletions trunk/drivers/regulator/lp8788-buck.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ static struct regulator_desc lp8788_buck_desc[] = {
},
};

static int lp8788_dvs_gpio_request(struct lp8788_buck *buck,
static int lp8788_dvs_gpio_request(struct platform_device *pdev,
struct lp8788_buck *buck,
enum lp8788_buck_id id)
{
struct lp8788_platform_data *pdata = buck->lp->pdata;
Expand All @@ -440,7 +441,7 @@ static int lp8788_dvs_gpio_request(struct lp8788_buck *buck,
switch (id) {
case BUCK1:
gpio = pdata->buck1_dvs->gpio;
ret = devm_gpio_request_one(buck->lp->dev, gpio, DVS_LOW,
ret = devm_gpio_request_one(&pdev->dev, gpio, DVS_LOW,
b1_name);
if (ret)
return ret;
Expand All @@ -450,7 +451,7 @@ 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 = devm_gpio_request_one(buck->lp->dev, gpio,
ret = devm_gpio_request_one(&pdev->dev, gpio,
DVS_LOW, b2_name[i]);
if (ret)
return ret;
Expand All @@ -464,7 +465,8 @@ static int lp8788_dvs_gpio_request(struct lp8788_buck *buck,
return 0;
}

static int lp8788_init_dvs(struct lp8788_buck *buck, enum lp8788_buck_id id)
static int lp8788_init_dvs(struct platform_device *pdev,
struct lp8788_buck *buck, enum lp8788_buck_id id)
{
struct lp8788_platform_data *pdata = buck->lp->pdata;
u8 mask[] = { LP8788_BUCK1_DVS_SEL_M, LP8788_BUCK2_DVS_SEL_M };
Expand All @@ -483,7 +485,7 @@ static int lp8788_init_dvs(struct lp8788_buck *buck, enum lp8788_buck_id id)
(id == BUCK2 && !pdata->buck2_dvs))
goto set_default_dvs_mode;

if (lp8788_dvs_gpio_request(buck, id))
if (lp8788_dvs_gpio_request(pdev, buck, id))
goto set_default_dvs_mode;

return lp8788_update_bits(buck->lp, LP8788_BUCK_DVS_SEL, mask[id],
Expand All @@ -509,7 +511,7 @@ static int lp8788_buck_probe(struct platform_device *pdev)

buck->lp = lp;

ret = lp8788_init_dvs(buck, id);
ret = lp8788_init_dvs(pdev, buck, id);
if (ret)
return ret;

Expand Down

0 comments on commit 436d0a1

Please sign in to comment.