aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/ab8500_charger.c
diff options
context:
space:
mode:
authorMarcus Cooper <marcus.xm.cooper@stericsson.com>2012-08-10 12:59:06 +0200
committerLee Jones <lee.jones@linaro.org>2013-03-07 12:35:46 +0800
commit405fea1c6691eb8259f2ca879c9348a4cf5d898d (patch)
tree87c46072f050cf5a4358c3ba59bda5b0d9558753 /drivers/power/ab8500_charger.c
parentd4337660d06945c9772182b5b8e72443ae3e475d (diff)
pm2301-charger: Always compile the PM2301 Charger driver with AB8500 Battery Mgnt
The PM2301 Charger should always be available when using the AB8500 Battery Management system, we're ensuring this will be the case. Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Hakan BERG <hakan.berg@stericsson.com> Reviewed-by: Mian Yousaf KAUKAB <mian.yousaf.kaukab@stericsson.com>
Diffstat (limited to 'drivers/power/ab8500_charger.c')
-rw-r--r--drivers/power/ab8500_charger.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index b5c7a397502..6fea4fdf870 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -3387,10 +3387,10 @@ static int ab8500_charger_remove(struct platform_device *pdev)
flush_scheduled_work();
if (di->usb_chg.enabled)
power_supply_unregister(&di->usb_chg.psy);
-#if !defined(CONFIG_CHARGER_PM2301)
- if (di->ac_chg.enabled)
+
+ if (di->ac_chg.enabled && !di->ac_chg.external)
power_supply_unregister(&di->ac_chg.psy);
-#endif
+
platform_set_drvdata(pdev, NULL);
return 0;