ab8500_bm: Remove unnecessary platform_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Mon, 6 May 2013 04:20:15 +0000 (13:20 +0900)
committerAnton Vorontsov <anton@enomsg.org>
Fri, 7 Jun 2013 00:13:09 +0000 (17:13 -0700)
The driver core clears the driver data to NULL after device_release or on
probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(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: Jingoo Han <jg1.han@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
drivers/power/ab8500_btemp.c
drivers/power/ab8500_charger.c
drivers/power/ab8500_fg.c
drivers/power/abx500_chargalg.c

index d412d34bf3df1998246e59a83373d06390d3a1c4..7f9a4547dccd9bf757fa1197e5a26ae0a319de1f 100644 (file)
@@ -1045,7 +1045,6 @@ static int ab8500_btemp_remove(struct platform_device *pdev)
 
        flush_scheduled_work();
        power_supply_unregister(&di->btemp_psy);
-       platform_set_drvdata(pdev, NULL);
 
        return 0;
 }
index a558318b169ce2e8b9b75a02a72513d5c101b4be..f098fdafee9fdfc6cfa09e7316a86beec2c70f66 100644 (file)
@@ -3425,8 +3425,6 @@ static int ab8500_charger_remove(struct platform_device *pdev)
        if (di->ac_chg.enabled && !di->ac_chg.external)
                power_supply_unregister(&di->ac_chg.psy);
 
-       platform_set_drvdata(pdev, NULL);
-
        return 0;
 }
 
index c5391f5c372dae2a41f3c05b7c77c7e374533f73..1263638b102d13a8fed54b2b699fa9b6f68c6feb 100644 (file)
@@ -3070,7 +3070,6 @@ static int ab8500_fg_remove(struct platform_device *pdev)
        flush_scheduled_work();
        ab8500_fg_sysfs_psy_remove_attrs(di->fg_psy.dev);
        power_supply_unregister(&di->fg_psy);
-       platform_set_drvdata(pdev, NULL);
        return ret;
 }
 
index 9863e423602c247e92e5502fc801dc8b080b8cd9..6d2723664a01092674815010cc70cb3a16c70d87 100644 (file)
@@ -2035,7 +2035,6 @@ static int abx500_chargalg_remove(struct platform_device *pdev)
        destroy_workqueue(di->chargalg_wq);
 
        power_supply_unregister(&di->chargalg_psy);
-       platform_set_drvdata(pdev, NULL);
 
        return 0;
 }
This page took 0.029077 seconds and 5 git commands to generate.