Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262158
b: refs/heads/master
c: 137a635
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown authored and Liam Girdwood committed Jul 28, 2011
1 parent 1b90a1e commit 38e1f6a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 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: 54abd335fda86d305845f9e62b4bc0997386eb66
refs/heads/master: 137a6354305455d585fe99fe5e9949acd895b045
16 changes: 14 additions & 2 deletions trunk/drivers/regulator/wm831x-dcdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,17 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
{
struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
struct wm831x_pdata *pdata = wm831x->dev->platform_data;
int id = pdev->id % ARRAY_SIZE(pdata->dcdc);
int id;
struct wm831x_dcdc *dcdc;
struct resource *res;
int ret, irq;

if (pdata && pdata->wm831x_num)
id = (pdata->wm831x_num * 10) + 1;
else
id = 0;
id = pdev->id - id;

dev_dbg(&pdev->dev, "Probing DCDC%d\n", id + 1);

if (pdata == NULL || pdata->dcdc[id] == NULL)
Expand Down Expand Up @@ -709,11 +715,17 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev)
{
struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
struct wm831x_pdata *pdata = wm831x->dev->platform_data;
int id = pdev->id % ARRAY_SIZE(pdata->dcdc);
int id;
struct wm831x_dcdc *dcdc;
struct resource *res;
int ret, irq;

if (pdata && pdata->wm831x_num)
id = (pdata->wm831x_num * 10) + 1;
else
id = 0;
id = pdev->id - id;

dev_dbg(&pdev->dev, "Probing DCDC%d\n", id + 1);

if (pdata == NULL || pdata->dcdc[id] == NULL)
Expand Down
25 changes: 22 additions & 3 deletions trunk/drivers/regulator/wm831x-ldo.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,17 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
{
struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
struct wm831x_pdata *pdata = wm831x->dev->platform_data;
int id = pdev->id % ARRAY_SIZE(pdata->ldo);
int id;
struct wm831x_ldo *ldo;
struct resource *res;
int ret, irq;

if (pdata && pdata->wm831x_num)
id = (pdata->wm831x_num * 10) + 1;
else
id = 0;
id = pdev->id - id;

dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);

if (pdata == NULL || pdata->ldo[id] == NULL)
Expand Down Expand Up @@ -574,11 +580,17 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
{
struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
struct wm831x_pdata *pdata = wm831x->dev->platform_data;
int id = pdev->id % ARRAY_SIZE(pdata->ldo);
int id;
struct wm831x_ldo *ldo;
struct resource *res;
int ret, irq;

if (pdata && pdata->wm831x_num)
id = (pdata->wm831x_num * 10) + 1;
else
id = 0;
id = pdev->id - id;

dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);

if (pdata == NULL || pdata->ldo[id] == NULL)
Expand Down Expand Up @@ -764,11 +776,18 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
{
struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
struct wm831x_pdata *pdata = wm831x->dev->platform_data;
int id = pdev->id % ARRAY_SIZE(pdata->ldo);
int id;
struct wm831x_ldo *ldo;
struct resource *res;
int ret;

if (pdata && pdata->wm831x_num)
id = (pdata->wm831x_num * 10) + 1;
else
id = 0;
id = pdev->id - id;


dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);

if (pdata == NULL || pdata->ldo[id] == NULL)
Expand Down

0 comments on commit 38e1f6a

Please sign in to comment.