From 405c54009c85cf03d459f5880744b0d4ebb892e4 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 3 May 2013 20:46:10 +0800 Subject: 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 Signed-off-by: Mark Brown --- drivers/regulator/wm831x-dcdc.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'drivers/regulator/wm831x-dcdc.c') 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) struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); struct wm831x *wm831x = dcdc->wm831x; - platform_set_drvdata(pdev, NULL); - free_irq(wm831x_irq(wm831x, platform_get_irq_byname(pdev, "HC")), dcdc); free_irq(wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")), @@ -714,8 +712,6 @@ static int wm831x_buckp_remove(struct platform_device *pdev) { struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); - platform_set_drvdata(pdev, NULL); - free_irq(wm831x_irq(dcdc->wm831x, platform_get_irq_byname(pdev, "UV")), dcdc); regulator_unregister(dcdc->regulator); @@ -849,8 +845,6 @@ static int wm831x_boostp_remove(struct platform_device *pdev) { struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); - platform_set_drvdata(pdev, NULL); - free_irq(wm831x_irq(dcdc->wm831x, platform_get_irq_byname(pdev, "UV")), dcdc); regulator_unregister(dcdc->regulator); @@ -940,7 +934,6 @@ static int wm831x_epe_remove(struct platform_device *pdev) { struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); - platform_set_drvdata(pdev, NULL); regulator_unregister(dcdc->regulator); return 0; -- cgit