Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323354
b: refs/heads/master
c: db55168
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Warren authored and Mark Brown committed Aug 28, 2012
1 parent 8bdc0ba commit 3088c3e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 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: 0764ef59161a4026c44ca184b7812383feabb769
refs/heads/master: db55168265699c72e6ebf7a4228029da590a3eab
24 changes: 22 additions & 2 deletions trunk/drivers/regulator/max8907-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,31 @@ static int max8907_regulator_parse_dt(struct platform_device *pdev)

return 0;
}

static inline struct regulator_init_data *match_init_data(int index)
{
return max8907_matches[index].init_data;
}

static inline struct device_node *match_of_node(int index)
{
return max8907_matches[index].of_node;
}
#else
static int max8907_regulator_parse_dt(struct platform_device *pdev)
{
return 0;
}

static inline struct regulator_init_data *match_init_data(int index)
{
return NULL;
}

static inline struct device_node *match_of_node(int index)
{
return NULL;
}
#endif

static __devinit int max8907_regulator_probe(struct platform_device *pdev)
Expand Down Expand Up @@ -295,11 +315,11 @@ static __devinit int max8907_regulator_probe(struct platform_device *pdev)
if (pdata)
idata = pdata->init_data[i];
else
idata = max8907_matches[i].init_data;
idata = match_init_data(i);
config.init_data = idata;
config.driver_data = pmic;
config.regmap = max8907->regmap_gen;
config.of_node = max8907_matches[i].of_node;
config.of_node = match_of_node(i);

switch (pmic->desc[i].id) {
case MAX8907_MBATT:
Expand Down

0 comments on commit 3088c3e

Please sign in to comment.