Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282193
b: refs/heads/master
c: fded2f4
h: refs/heads/master
i:
  282191: 1ad1587
v: v3
  • Loading branch information
Mark Brown committed Dec 20, 2011
1 parent 682d9f6 commit f087a1c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 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: 6242eae9bce864467bc4d6a8b67d1846ecaccf23
refs/heads/master: fded2f4faee7670b0545ac05bd2b3ed6b9afcda2
10 changes: 4 additions & 6 deletions trunk/drivers/regulator/wm831x-dcdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,8 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
if (pdata == NULL || pdata->dcdc[id] == NULL)
return -ENODEV;

dcdc = kzalloc(sizeof(struct wm831x_dcdc), GFP_KERNEL);
dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
GFP_KERNEL);
if (dcdc == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
return -ENOMEM;
Expand Down Expand Up @@ -590,7 +591,6 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
err:
if (dcdc->dvs_gpio)
gpio_free(dcdc->dvs_gpio);
kfree(dcdc);
return ret;
}

Expand All @@ -605,7 +605,6 @@ static __devexit int wm831x_buckv_remove(struct platform_device *pdev)
regulator_unregister(dcdc->regulator);
if (dcdc->dvs_gpio)
gpio_free(dcdc->dvs_gpio);
kfree(dcdc);

return 0;
}
Expand Down Expand Up @@ -722,7 +721,8 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev)
if (pdata == NULL || pdata->dcdc[id] == NULL)
return -ENODEV;

dcdc = kzalloc(sizeof(struct wm831x_dcdc), GFP_KERNEL);
dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
GFP_KERNEL);
if (dcdc == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
return -ENOMEM;
Expand Down Expand Up @@ -771,7 +771,6 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev)
err_regulator:
regulator_unregister(dcdc->regulator);
err:
kfree(dcdc);
return ret;
}

Expand All @@ -783,7 +782,6 @@ static __devexit int wm831x_buckp_remove(struct platform_device *pdev)

free_irq(platform_get_irq_byname(pdev, "UV"), dcdc);
regulator_unregister(dcdc->regulator);
kfree(dcdc);

return 0;
}
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/regulator/wm831x-isink.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ static __devinit int wm831x_isink_probe(struct platform_device *pdev)
if (pdata == NULL || pdata->isink[id] == NULL)
return -ENODEV;

isink = kzalloc(sizeof(struct wm831x_isink), GFP_KERNEL);
isink = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_isink),
GFP_KERNEL);
if (isink == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
return -ENOMEM;
Expand Down Expand Up @@ -213,7 +214,6 @@ static __devinit int wm831x_isink_probe(struct platform_device *pdev)
err_regulator:
regulator_unregister(isink->regulator);
err:
kfree(isink);
return ret;
}

Expand All @@ -226,7 +226,6 @@ static __devexit int wm831x_isink_remove(struct platform_device *pdev)
free_irq(platform_get_irq(pdev, 0), isink);

regulator_unregister(isink->regulator);
kfree(isink);

return 0;
}
Expand Down
12 changes: 3 additions & 9 deletions trunk/drivers/regulator/wm831x-ldo.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
if (pdata == NULL || pdata->ldo[id] == NULL)
return -ENODEV;

ldo = kzalloc(sizeof(struct wm831x_ldo), GFP_KERNEL);
ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
if (ldo == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
return -ENOMEM;
Expand Down Expand Up @@ -376,7 +376,6 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
err_regulator:
regulator_unregister(ldo->regulator);
err:
kfree(ldo);
return ret;
}

Expand All @@ -388,7 +387,6 @@ static __devexit int wm831x_gp_ldo_remove(struct platform_device *pdev)

free_irq(platform_get_irq_byname(pdev, "UV"), ldo);
regulator_unregister(ldo->regulator);
kfree(ldo);

return 0;
}
Expand Down Expand Up @@ -596,7 +594,7 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
if (pdata == NULL || pdata->ldo[id] == NULL)
return -ENODEV;

ldo = kzalloc(sizeof(struct wm831x_ldo), GFP_KERNEL);
ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
if (ldo == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
return -ENOMEM;
Expand Down Expand Up @@ -645,7 +643,6 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
err_regulator:
regulator_unregister(ldo->regulator);
err:
kfree(ldo);
return ret;
}

Expand All @@ -655,7 +652,6 @@ static __devexit int wm831x_aldo_remove(struct platform_device *pdev)

free_irq(platform_get_irq_byname(pdev, "UV"), ldo);
regulator_unregister(ldo->regulator);
kfree(ldo);

return 0;
}
Expand Down Expand Up @@ -793,7 +789,7 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
if (pdata == NULL || pdata->ldo[id] == NULL)
return -ENODEV;

ldo = kzalloc(sizeof(struct wm831x_ldo), GFP_KERNEL);
ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
if (ldo == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
return -ENOMEM;
Expand Down Expand Up @@ -831,7 +827,6 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
return 0;

err:
kfree(ldo);
return ret;
}

Expand All @@ -840,7 +835,6 @@ static __devexit int wm831x_alive_ldo_remove(struct platform_device *pdev)
struct wm831x_ldo *ldo = platform_get_drvdata(pdev);

regulator_unregister(ldo->regulator);
kfree(ldo);

return 0;
}
Expand Down

0 comments on commit f087a1c

Please sign in to comment.