diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-05-03 08:46:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-12 10:34:12 -0400 |
commit | 405c54009c85cf03d459f5880744b0d4ebb892e4 (patch) | |
tree | 274cba389901c774ed0d2a9315469198205ff851 /drivers/regulator | |
parent | f722406faae2d073cc1d01063d1123c35425939e (diff) |
regulator: Remove all platform_set_drvdata(pdev, NULL) in drivers
Since 0998d06310 "device-core: Ensure drvdata = NULL when no driver is bound",
this is done by driver core after device_release or on probe failure.
Thus we can remove all platform_set_drvdata(pdev, NULL) in drivers.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/88pm8607.c | 1 | ||||
-rw-r--r-- | drivers/regulator/lp8788-buck.c | 1 | ||||
-rw-r--r-- | drivers/regulator/lp8788-ldo.c | 2 | ||||
-rw-r--r-- | drivers/regulator/max8925-regulator.c | 1 | ||||
-rw-r--r-- | drivers/regulator/mc13783-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/mc13892-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/pcap-regulator.c | 1 | ||||
-rw-r--r-- | drivers/regulator/pcf50633-regulator.c | 1 | ||||
-rw-r--r-- | drivers/regulator/tps65217-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/virtual.c | 2 | ||||
-rw-r--r-- | drivers/regulator/wm831x-dcdc.c | 7 | ||||
-rw-r--r-- | drivers/regulator/wm831x-isink.c | 2 | ||||
-rw-r--r-- | drivers/regulator/wm831x-ldo.c | 2 | ||||
-rw-r--r-- | drivers/regulator/wm8400-regulator.c | 1 | ||||
-rw-r--r-- | drivers/regulator/wm8994-regulator.c | 2 |
15 files changed, 0 insertions, 29 deletions
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index 493948a38fca..8a7cb1f43046 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c | |||
@@ -406,7 +406,6 @@ static int pm8607_regulator_remove(struct platform_device *pdev) | |||
406 | { | 406 | { |
407 | struct pm8607_regulator_info *info = platform_get_drvdata(pdev); | 407 | struct pm8607_regulator_info *info = platform_get_drvdata(pdev); |
408 | 408 | ||
409 | platform_set_drvdata(pdev, NULL); | ||
410 | regulator_unregister(info->regulator); | 409 | regulator_unregister(info->regulator); |
411 | return 0; | 410 | return 0; |
412 | } | 411 | } |
diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c index eb1e1e88ae51..0b015f2a7fd9 100644 --- a/drivers/regulator/lp8788-buck.c +++ b/drivers/regulator/lp8788-buck.c | |||
@@ -533,7 +533,6 @@ static int lp8788_buck_remove(struct platform_device *pdev) | |||
533 | { | 533 | { |
534 | struct lp8788_buck *buck = platform_get_drvdata(pdev); | 534 | struct lp8788_buck *buck = platform_get_drvdata(pdev); |
535 | 535 | ||
536 | platform_set_drvdata(pdev, NULL); | ||
537 | regulator_unregister(buck->regulator); | 536 | regulator_unregister(buck->regulator); |
538 | 537 | ||
539 | return 0; | 538 | return 0; |
diff --git a/drivers/regulator/lp8788-ldo.c b/drivers/regulator/lp8788-ldo.c index 0ce2c4c194b3..0527d87c6dd5 100644 --- a/drivers/regulator/lp8788-ldo.c +++ b/drivers/regulator/lp8788-ldo.c | |||
@@ -561,7 +561,6 @@ static int lp8788_dldo_remove(struct platform_device *pdev) | |||
561 | { | 561 | { |
562 | struct lp8788_ldo *ldo = platform_get_drvdata(pdev); | 562 | struct lp8788_ldo *ldo = platform_get_drvdata(pdev); |
563 | 563 | ||
564 | platform_set_drvdata(pdev, NULL); | ||
565 | regulator_unregister(ldo->regulator); | 564 | regulator_unregister(ldo->regulator); |
566 | 565 | ||
567 | return 0; | 566 | return 0; |
@@ -622,7 +621,6 @@ static int lp8788_aldo_remove(struct platform_device *pdev) | |||
622 | { | 621 | { |
623 | struct lp8788_ldo *ldo = platform_get_drvdata(pdev); | 622 | struct lp8788_ldo *ldo = platform_get_drvdata(pdev); |
624 | 623 | ||
625 | platform_set_drvdata(pdev, NULL); | ||
626 | regulator_unregister(ldo->regulator); | 624 | regulator_unregister(ldo->regulator); |
627 | 625 | ||
628 | return 0; | 626 | return 0; |
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c index 3597da8f0dca..e6d54a546d36 100644 --- a/drivers/regulator/max8925-regulator.c +++ b/drivers/regulator/max8925-regulator.c | |||
@@ -327,7 +327,6 @@ static int max8925_regulator_remove(struct platform_device *pdev) | |||
327 | { | 327 | { |
328 | struct regulator_dev *rdev = platform_get_drvdata(pdev); | 328 | struct regulator_dev *rdev = platform_get_drvdata(pdev); |
329 | 329 | ||
330 | platform_set_drvdata(pdev, NULL); | ||
331 | regulator_unregister(rdev); | 330 | regulator_unregister(rdev); |
332 | 331 | ||
333 | return 0; | 332 | return 0; |
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c index fdf7f0a09090..5ff99d2703db 100644 --- a/drivers/regulator/mc13783-regulator.c +++ b/drivers/regulator/mc13783-regulator.c | |||
@@ -466,8 +466,6 @@ static int mc13783_regulator_remove(struct platform_device *pdev) | |||
466 | struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev); | 466 | struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev); |
467 | int i; | 467 | int i; |
468 | 468 | ||
469 | platform_set_drvdata(pdev, NULL); | ||
470 | |||
471 | for (i = 0; i < priv->num_regulators; i++) | 469 | for (i = 0; i < priv->num_regulators; i++) |
472 | regulator_unregister(priv->regulators[i]); | 470 | regulator_unregister(priv->regulators[i]); |
473 | 471 | ||
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c index b716283a8760..1037e07937cf 100644 --- a/drivers/regulator/mc13892-regulator.c +++ b/drivers/regulator/mc13892-regulator.c | |||
@@ -636,8 +636,6 @@ static int mc13892_regulator_remove(struct platform_device *pdev) | |||
636 | struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev); | 636 | struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev); |
637 | int i; | 637 | int i; |
638 | 638 | ||
639 | platform_set_drvdata(pdev, NULL); | ||
640 | |||
641 | for (i = 0; i < priv->num_regulators; i++) | 639 | for (i = 0; i < priv->num_regulators; i++) |
642 | regulator_unregister(priv->regulators[i]); | 640 | regulator_unregister(priv->regulators[i]); |
643 | 641 | ||
diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c index 4899342f1fc1..1a73a297fe73 100644 --- a/drivers/regulator/pcap-regulator.c +++ b/drivers/regulator/pcap-regulator.c | |||
@@ -260,7 +260,6 @@ static int pcap_regulator_remove(struct platform_device *pdev) | |||
260 | struct regulator_dev *rdev = platform_get_drvdata(pdev); | 260 | struct regulator_dev *rdev = platform_get_drvdata(pdev); |
261 | 261 | ||
262 | regulator_unregister(rdev); | 262 | regulator_unregister(rdev); |
263 | platform_set_drvdata(pdev, NULL); | ||
264 | 263 | ||
265 | return 0; | 264 | return 0; |
266 | } | 265 | } |
diff --git a/drivers/regulator/pcf50633-regulator.c b/drivers/regulator/pcf50633-regulator.c index 534075e13d6d..54df9f7cb504 100644 --- a/drivers/regulator/pcf50633-regulator.c +++ b/drivers/regulator/pcf50633-regulator.c | |||
@@ -106,7 +106,6 @@ static int pcf50633_regulator_remove(struct platform_device *pdev) | |||
106 | { | 106 | { |
107 | struct regulator_dev *rdev = platform_get_drvdata(pdev); | 107 | struct regulator_dev *rdev = platform_get_drvdata(pdev); |
108 | 108 | ||
109 | platform_set_drvdata(pdev, NULL); | ||
110 | regulator_unregister(rdev); | 109 | regulator_unregister(rdev); |
111 | 110 | ||
112 | return 0; | 111 | return 0; |
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c index df395187c063..2df4616621f5 100644 --- a/drivers/regulator/tps65217-regulator.c +++ b/drivers/regulator/tps65217-regulator.c | |||
@@ -405,8 +405,6 @@ static int tps65217_regulator_remove(struct platform_device *pdev) | |||
405 | for (i = 0; i < TPS65217_NUM_REGULATOR; i++) | 405 | for (i = 0; i < TPS65217_NUM_REGULATOR; i++) |
406 | regulator_unregister(tps->rdev[i]); | 406 | regulator_unregister(tps->rdev[i]); |
407 | 407 | ||
408 | platform_set_drvdata(pdev, NULL); | ||
409 | |||
410 | return 0; | 408 | return 0; |
411 | } | 409 | } |
412 | 410 | ||
diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c index 01c66e9712a4..a9d4284ea007 100644 --- a/drivers/regulator/virtual.c +++ b/drivers/regulator/virtual.c | |||
@@ -330,8 +330,6 @@ static int regulator_virtual_remove(struct platform_device *pdev) | |||
330 | if (drvdata->enabled) | 330 | if (drvdata->enabled) |
331 | regulator_disable(drvdata->regulator); | 331 | regulator_disable(drvdata->regulator); |
332 | 332 | ||
333 | platform_set_drvdata(pdev, NULL); | ||
334 | |||
335 | return 0; | 333 | return 0; |
336 | } | 334 | } |
337 | 335 | ||
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 0af6898bcd79..46938cf162ad 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c | |||
@@ -567,8 +567,6 @@ static int wm831x_buckv_remove(struct platform_device *pdev) | |||
567 | struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); | 567 | struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); |
568 | struct wm831x *wm831x = dcdc->wm831x; | 568 | struct wm831x *wm831x = dcdc->wm831x; |
569 | 569 | ||
570 | platform_set_drvdata(pdev, NULL); | ||
571 | |||
572 | free_irq(wm831x_irq(wm831x, platform_get_irq_byname(pdev, "HC")), | 570 | free_irq(wm831x_irq(wm831x, platform_get_irq_byname(pdev, "HC")), |
573 | dcdc); | 571 | dcdc); |
574 | free_irq(wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")), | 572 | free_irq(wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")), |
@@ -714,8 +712,6 @@ static int wm831x_buckp_remove(struct platform_device *pdev) | |||
714 | { | 712 | { |
715 | struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); | 713 | struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); |
716 | 714 | ||
717 | platform_set_drvdata(pdev, NULL); | ||
718 | |||
719 | free_irq(wm831x_irq(dcdc->wm831x, platform_get_irq_byname(pdev, "UV")), | 715 | free_irq(wm831x_irq(dcdc->wm831x, platform_get_irq_byname(pdev, "UV")), |
720 | dcdc); | 716 | dcdc); |
721 | regulator_unregister(dcdc->regulator); | 717 | regulator_unregister(dcdc->regulator); |
@@ -849,8 +845,6 @@ static int wm831x_boostp_remove(struct platform_device *pdev) | |||
849 | { | 845 | { |
850 | struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); | 846 | struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); |
851 | 847 | ||
852 | platform_set_drvdata(pdev, NULL); | ||
853 | |||
854 | free_irq(wm831x_irq(dcdc->wm831x, platform_get_irq_byname(pdev, "UV")), | 848 | free_irq(wm831x_irq(dcdc->wm831x, platform_get_irq_byname(pdev, "UV")), |
855 | dcdc); | 849 | dcdc); |
856 | regulator_unregister(dcdc->regulator); | 850 | regulator_unregister(dcdc->regulator); |
@@ -940,7 +934,6 @@ static int wm831x_epe_remove(struct platform_device *pdev) | |||
940 | { | 934 | { |
941 | struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); | 935 | struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); |
942 | 936 | ||
943 | platform_set_drvdata(pdev, NULL); | ||
944 | regulator_unregister(dcdc->regulator); | 937 | regulator_unregister(dcdc->regulator); |
945 | 938 | ||
946 | return 0; | 939 | return 0; |
diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c index 68586ee3e1cb..16ebdf94d0a0 100644 --- a/drivers/regulator/wm831x-isink.c +++ b/drivers/regulator/wm831x-isink.c | |||
@@ -225,8 +225,6 @@ static int wm831x_isink_remove(struct platform_device *pdev) | |||
225 | { | 225 | { |
226 | struct wm831x_isink *isink = platform_get_drvdata(pdev); | 226 | struct wm831x_isink *isink = platform_get_drvdata(pdev); |
227 | 227 | ||
228 | platform_set_drvdata(pdev, NULL); | ||
229 | |||
230 | free_irq(wm831x_irq(isink->wm831x, platform_get_irq(pdev, 0)), isink); | 228 | free_irq(wm831x_irq(isink->wm831x, platform_get_irq(pdev, 0)), isink); |
231 | 229 | ||
232 | regulator_unregister(isink->regulator); | 230 | regulator_unregister(isink->regulator); |
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c index 1ec379a9a95c..9ff883f80878 100644 --- a/drivers/regulator/wm831x-ldo.c +++ b/drivers/regulator/wm831x-ldo.c | |||
@@ -338,8 +338,6 @@ static int wm831x_gp_ldo_remove(struct platform_device *pdev) | |||
338 | { | 338 | { |
339 | struct wm831x_ldo *ldo = platform_get_drvdata(pdev); | 339 | struct wm831x_ldo *ldo = platform_get_drvdata(pdev); |
340 | 340 | ||
341 | platform_set_drvdata(pdev, NULL); | ||
342 | |||
343 | free_irq(wm831x_irq(ldo->wm831x, | 341 | free_irq(wm831x_irq(ldo->wm831x, |
344 | platform_get_irq_byname(pdev, "UV")), ldo); | 342 | platform_get_irq_byname(pdev, "UV")), ldo); |
345 | regulator_unregister(ldo->regulator); | 343 | regulator_unregister(ldo->regulator); |
diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c index c6a32ea80b9d..a09f03ee5506 100644 --- a/drivers/regulator/wm8400-regulator.c +++ b/drivers/regulator/wm8400-regulator.c | |||
@@ -250,7 +250,6 @@ static int wm8400_regulator_remove(struct platform_device *pdev) | |||
250 | { | 250 | { |
251 | struct regulator_dev *rdev = platform_get_drvdata(pdev); | 251 | struct regulator_dev *rdev = platform_get_drvdata(pdev); |
252 | 252 | ||
253 | platform_set_drvdata(pdev, NULL); | ||
254 | regulator_unregister(rdev); | 253 | regulator_unregister(rdev); |
255 | 254 | ||
256 | return 0; | 255 | return 0; |
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c index a612c356a697..8f2a8a7a3f99 100644 --- a/drivers/regulator/wm8994-regulator.c +++ b/drivers/regulator/wm8994-regulator.c | |||
@@ -185,8 +185,6 @@ static int wm8994_ldo_remove(struct platform_device *pdev) | |||
185 | { | 185 | { |
186 | struct wm8994_ldo *ldo = platform_get_drvdata(pdev); | 186 | struct wm8994_ldo *ldo = platform_get_drvdata(pdev); |
187 | 187 | ||
188 | platform_set_drvdata(pdev, NULL); | ||
189 | |||
190 | regulator_unregister(ldo->regulator); | 188 | regulator_unregister(ldo->regulator); |
191 | 189 | ||
192 | return 0; | 190 | return 0; |