Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
[firefly-linux-kernel-4.4.55.git] / drivers / power / intel_mid_battery.c
index 36cf402c06772b6b34a7d5dd1c042c46cadd8ad2..bce3a01da2f0f33137e5901c066cc0f3f2a0f48b 100644 (file)
@@ -765,7 +765,7 @@ static int __devexit platform_pmic_battery_remove(struct platform_device *pdev)
        power_supply_unregister(&pbi->usb);
        power_supply_unregister(&pbi->batt);
 
-       flush_scheduled_work();
+       cancel_work_sync(&pbi->handler);
        kfree(pbi);
        return 0;
 }