]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/kernel-common.git/commitdiff
power: android-battery: use freezable workqueue for monitor
authorTodd Poynor <toddpoynor@google.com>
Fri, 5 Oct 2012 09:04:45 +0000 (02:04 -0700)
committerArve Hjønnevåg <arve@android.com>
Wed, 20 Feb 2013 01:55:34 +0000 (17:55 -0800)
Alarmtimer may execute the monitor early in the resume sequence.  Freeze the
monitor while suspended, and unfreeze after the battery charger and fuel gauge,
etc. drivers are resumed.

Change-Id: Iefda1c642d4b2440169d90d2bee2888fc70e030a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
drivers/power/android_battery.c

index 5001bba28f91af89d5a7116800e3c45fda8ea86b..7befc14e3aa3aa69a23f5d9671ed1da273903971 100644 (file)
@@ -627,7 +627,7 @@ static int android_bat_probe(struct platform_device *pdev)
        }
 
        battery->monitor_wqueue =
-               create_singlethread_workqueue(dev_name(&pdev->dev));
+               alloc_workqueue(dev_name(&pdev->dev), WQ_FREEZABLE, 1);
        if (!battery->monitor_wqueue) {
                dev_err(battery->dev, "%s: fail to create workqueue\n",
                                __func__);