summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>2016-08-13 18:20:11 +0200
committerSebastian Reichel <sre@kernel.org>2016-08-16 00:54:37 +0200
commit87f818b35c3007d1014541c07688ab29443a22c2 (patch)
tree5f4fa364acceae0fb086514f6b886c6a843e60b9 /drivers/power
parentpower: pm2301_charger: Remove deprecated create_singlethread_workqueue (diff)
downloadlinux-87f818b35c3007d1014541c07688ab29443a22c2.tar.xz
linux-87f818b35c3007d1014541c07688ab29443a22c2.zip
power: intel_mid_battery: Remove deprecated create_singlethread_workqueue
The workqueue "monitor_wqueue" is used to monitor the PMIC battery status. It queues a single work item (pbi->monitor_battery) and hence doesn't require ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance. Since PMIC battery status needs to be monitored for any change, the WQ_MEM_RECLAIM flag has been set to ensure forward progress under memory pressure. Since there is a single work item, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/intel_mid_battery.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/power/supply/intel_mid_battery.c b/drivers/power/supply/intel_mid_battery.c
index 9fa4acc107ca..dc7feef1bea4 100644
--- a/drivers/power/supply/intel_mid_battery.c
+++ b/drivers/power/supply/intel_mid_battery.c
@@ -689,8 +689,7 @@ static int probe(int irq, struct device *dev)
/* initialize all required framework before enabling interrupts */
INIT_WORK(&pbi->handler, pmic_battery_handle_intrpt);
INIT_DELAYED_WORK(&pbi->monitor_battery, pmic_battery_monitor);
- pbi->monitor_wqueue =
- create_singlethread_workqueue(dev_name(dev));
+ pbi->monitor_wqueue = alloc_workqueue(dev_name(dev), WQ_MEM_RECLAIM, 0);
if (!pbi->monitor_wqueue) {
dev_err(dev, "%s(): wqueue init failed\n", __func__);
retval = -ESRCH;