From 405fea1c6691eb8259f2ca879c9348a4cf5d898d Mon Sep 17 00:00:00 2001 From: Marcus Cooper Date: Fri, 10 Aug 2012 12:59:06 +0200 Subject: 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 Signed-off-by: Lee Jones Reviewed-by: Hakan BERG Reviewed-by: Mian Yousaf KAUKAB --- drivers/power/ab8500_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/power/ab8500_charger.c') 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; -- cgit v1.2.3-70-g09d2