Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323364
b: refs/heads/master
c: 5bab305
h: refs/heads/master
v: v3
  • Loading branch information
Kim, Milo authored and Mark Brown committed Sep 5, 2012
1 parent 952437f commit 22d4be2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 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: 9d6da6fcc2831220a8754385ee54847e3ee6274f
refs/heads/master: 5bab305d3c573afc33b241a53452f6736910b2b4
28 changes: 0 additions & 28 deletions trunk/drivers/regulator/lp872x.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,28 +729,6 @@ static struct regulator_desc lp8725_regulator_desc[] = {
},
};

static int lp872x_check_dvs_validity(struct lp872x *lp)
{
struct lp872x_dvs *dvs = lp->pdata->dvs;
u8 val = 0;
int ret;

ret = lp872x_read_byte(lp, LP872X_GENERAL_CFG, &val);
if (ret)
return ret;

ret = 0;
if (lp->chipid == LP8720) {
if (val & LP8720_EXT_DVS_M)
ret = dvs ? 0 : -EINVAL;
} else {
if ((val & LP8725_DVS1_M) == EXTERN_DVS_USED)
ret = dvs ? 0 : -EINVAL;
}

return ret;
}

static int lp872x_init_dvs(struct lp872x *lp)
{
int ret, gpio;
Expand All @@ -762,12 +740,6 @@ static int lp872x_init_dvs(struct lp872x *lp)
if (!dvs)
goto set_default_dvs_mode;

ret = lp872x_check_dvs_validity(lp);
if (ret) {
dev_warn(lp->dev, "invalid dvs data: %d\n", ret);
return ret;
}

gpio = dvs->gpio;
if (!gpio_is_valid(gpio)) {
dev_err(lp->dev, "invalid gpio: %d\n", gpio);
Expand Down

0 comments on commit 22d4be2

Please sign in to comment.