From abbfb7cc1cec8018615a636c46d4a9e94d97aa22 Mon Sep 17 00:00:00 2001 From: Todd Poynor Date: Fri, 5 Oct 2012 02:04:45 -0700 Subject: [PATCH] power: android-battery: use freezable workqueue for monitor 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 --- drivers/power/android_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/android_battery.c b/drivers/power/android_battery.c index 5001bba28f91..7befc14e3aa3 100644 --- a/drivers/power/android_battery.c +++ b/drivers/power/android_battery.c @@ -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__); -- 2.34.1