Commit ddeeb8f9 authored by Jingoo Han's avatar Jingoo Han Committed by Anton Vorontsov

ab8500_bm: Remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on
probe failure, since commit 0998d063
(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is
not needed to manually clear the device driver data to NULL.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
parent 71c29b3a
...@@ -1045,7 +1045,6 @@ static int ab8500_btemp_remove(struct platform_device *pdev) ...@@ -1045,7 +1045,6 @@ static int ab8500_btemp_remove(struct platform_device *pdev)
flush_scheduled_work(); flush_scheduled_work();
power_supply_unregister(&di->btemp_psy); power_supply_unregister(&di->btemp_psy);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }
......
...@@ -3425,8 +3425,6 @@ static int ab8500_charger_remove(struct platform_device *pdev) ...@@ -3425,8 +3425,6 @@ static int ab8500_charger_remove(struct platform_device *pdev)
if (di->ac_chg.enabled && !di->ac_chg.external) if (di->ac_chg.enabled && !di->ac_chg.external)
power_supply_unregister(&di->ac_chg.psy); power_supply_unregister(&di->ac_chg.psy);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }
......
...@@ -3070,7 +3070,6 @@ static int ab8500_fg_remove(struct platform_device *pdev) ...@@ -3070,7 +3070,6 @@ static int ab8500_fg_remove(struct platform_device *pdev)
flush_scheduled_work(); flush_scheduled_work();
ab8500_fg_sysfs_psy_remove_attrs(di->fg_psy.dev); ab8500_fg_sysfs_psy_remove_attrs(di->fg_psy.dev);
power_supply_unregister(&di->fg_psy); power_supply_unregister(&di->fg_psy);
platform_set_drvdata(pdev, NULL);
return ret; return ret;
} }
......
...@@ -2035,7 +2035,6 @@ static int abx500_chargalg_remove(struct platform_device *pdev) ...@@ -2035,7 +2035,6 @@ static int abx500_chargalg_remove(struct platform_device *pdev)
destroy_workqueue(di->chargalg_wq); destroy_workqueue(di->chargalg_wq);
power_supply_unregister(&di->chargalg_psy); power_supply_unregister(&di->chargalg_psy);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment