Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Mark Brown
405c5400 f722406f

-29
-1
drivers/regulator/88pm8607.c
··· 406 406 { 407 407 struct pm8607_regulator_info *info = platform_get_drvdata(pdev); 408 408 409 - platform_set_drvdata(pdev, NULL); 410 409 regulator_unregister(info->regulator); 411 410 return 0; 412 411 }
-1
drivers/regulator/lp8788-buck.c
··· 533 533 { 534 534 struct lp8788_buck *buck = platform_get_drvdata(pdev); 535 535 536 - platform_set_drvdata(pdev, NULL); 537 536 regulator_unregister(buck->regulator); 538 537 539 538 return 0;
-2
drivers/regulator/lp8788-ldo.c
··· 561 561 { 562 562 struct lp8788_ldo *ldo = platform_get_drvdata(pdev); 563 563 564 - platform_set_drvdata(pdev, NULL); 565 564 regulator_unregister(ldo->regulator); 566 565 567 566 return 0; ··· 621 622 { 622 623 struct lp8788_ldo *ldo = platform_get_drvdata(pdev); 623 624 624 - platform_set_drvdata(pdev, NULL); 625 625 regulator_unregister(ldo->regulator); 626 626 627 627 return 0;
-1
drivers/regulator/max8925-regulator.c
··· 327 327 { 328 328 struct regulator_dev *rdev = platform_get_drvdata(pdev); 329 329 330 - platform_set_drvdata(pdev, NULL); 331 330 regulator_unregister(rdev); 332 331 333 332 return 0;
-2
drivers/regulator/mc13783-regulator.c
··· 466 466 struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev); 467 467 int i; 468 468 469 - platform_set_drvdata(pdev, NULL); 470 - 471 469 for (i = 0; i < priv->num_regulators; i++) 472 470 regulator_unregister(priv->regulators[i]); 473 471
-2
drivers/regulator/mc13892-regulator.c
··· 636 636 struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev); 637 637 int i; 638 638 639 - platform_set_drvdata(pdev, NULL); 640 - 641 639 for (i = 0; i < priv->num_regulators; i++) 642 640 regulator_unregister(priv->regulators[i]); 643 641
-1
drivers/regulator/pcap-regulator.c
··· 260 260 struct regulator_dev *rdev = platform_get_drvdata(pdev); 261 261 262 262 regulator_unregister(rdev); 263 - platform_set_drvdata(pdev, NULL); 264 263 265 264 return 0; 266 265 }
-1
drivers/regulator/pcf50633-regulator.c
··· 106 106 { 107 107 struct regulator_dev *rdev = platform_get_drvdata(pdev); 108 108 109 - platform_set_drvdata(pdev, NULL); 110 109 regulator_unregister(rdev); 111 110 112 111 return 0;
-2
drivers/regulator/tps65217-regulator.c
··· 405 405 for (i = 0; i < TPS65217_NUM_REGULATOR; i++) 406 406 regulator_unregister(tps->rdev[i]); 407 407 408 - platform_set_drvdata(pdev, NULL); 409 - 410 408 return 0; 411 409 } 412 410
-2
drivers/regulator/virtual.c
··· 330 330 if (drvdata->enabled) 331 331 regulator_disable(drvdata->regulator); 332 332 333 - platform_set_drvdata(pdev, NULL); 334 - 335 333 return 0; 336 334 } 337 335
-7
drivers/regulator/wm831x-dcdc.c
··· 567 567 struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); 568 568 struct wm831x *wm831x = dcdc->wm831x; 569 569 570 - platform_set_drvdata(pdev, NULL); 571 - 572 570 free_irq(wm831x_irq(wm831x, platform_get_irq_byname(pdev, "HC")), 573 571 dcdc); 574 572 free_irq(wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")), ··· 712 714 { 713 715 struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); 714 716 715 - platform_set_drvdata(pdev, NULL); 716 - 717 717 free_irq(wm831x_irq(dcdc->wm831x, platform_get_irq_byname(pdev, "UV")), 718 718 dcdc); 719 719 regulator_unregister(dcdc->regulator); ··· 845 849 { 846 850 struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); 847 851 848 - platform_set_drvdata(pdev, NULL); 849 - 850 852 free_irq(wm831x_irq(dcdc->wm831x, platform_get_irq_byname(pdev, "UV")), 851 853 dcdc); 852 854 regulator_unregister(dcdc->regulator); ··· 934 940 { 935 941 struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); 936 942 937 - platform_set_drvdata(pdev, NULL); 938 943 regulator_unregister(dcdc->regulator); 939 944 940 945 return 0;
-2
drivers/regulator/wm831x-isink.c
··· 225 225 { 226 226 struct wm831x_isink *isink = platform_get_drvdata(pdev); 227 227 228 - platform_set_drvdata(pdev, NULL); 229 - 230 228 free_irq(wm831x_irq(isink->wm831x, platform_get_irq(pdev, 0)), isink); 231 229 232 230 regulator_unregister(isink->regulator);
-2
drivers/regulator/wm831x-ldo.c
··· 338 338 { 339 339 struct wm831x_ldo *ldo = platform_get_drvdata(pdev); 340 340 341 - platform_set_drvdata(pdev, NULL); 342 - 343 341 free_irq(wm831x_irq(ldo->wm831x, 344 342 platform_get_irq_byname(pdev, "UV")), ldo); 345 343 regulator_unregister(ldo->regulator);
-1
drivers/regulator/wm8400-regulator.c
··· 250 250 { 251 251 struct regulator_dev *rdev = platform_get_drvdata(pdev); 252 252 253 - platform_set_drvdata(pdev, NULL); 254 253 regulator_unregister(rdev); 255 254 256 255 return 0;
-2
drivers/regulator/wm8994-regulator.c
··· 185 185 { 186 186 struct wm8994_ldo *ldo = platform_get_drvdata(pdev); 187 187 188 - platform_set_drvdata(pdev, NULL); 189 - 190 188 regulator_unregister(ldo->regulator); 191 189 192 190 return 0;