diff options
author | Bhaktipriya Shridhar <bhaktipriya96@gmail.com> | 2016-08-13 12:33:53 -0400 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2016-08-15 18:54:37 -0400 |
commit | 829f0e97cc03b0c834cc5f86ff72b2ec389020ef (patch) | |
tree | 3cae884ca357ce211d9b3278e047c978218a3502 | |
parent | 9df82628265857e1c491c1ca0ace353e658457ea (diff) |
power: ipaq_micro_battery: Remove deprecated create_singlethread_workqueue
The workqueue "wq" is used for handling battery related tasks.
It has a single work item viz &mb->update and hence it doesn't require
execution ordering. Hence, alloc_workqueue has been used to replace the
deprecated create_singlethread_workqueue instance.
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>
-rw-r--r-- | drivers/power/supply/ipaq_micro_battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/ipaq_micro_battery.c b/drivers/power/supply/ipaq_micro_battery.c index 35b01c7d775b..4af7b770f293 100644 --- a/drivers/power/supply/ipaq_micro_battery.c +++ b/drivers/power/supply/ipaq_micro_battery.c | |||
@@ -235,7 +235,7 @@ static int micro_batt_probe(struct platform_device *pdev) | |||
235 | return -ENOMEM; | 235 | return -ENOMEM; |
236 | 236 | ||
237 | mb->micro = dev_get_drvdata(pdev->dev.parent); | 237 | mb->micro = dev_get_drvdata(pdev->dev.parent); |
238 | mb->wq = create_singlethread_workqueue("ipaq-battery-wq"); | 238 | mb->wq = alloc_workqueue("ipaq-battery-wq", WQ_MEM_RECLAIM, 0); |
239 | if (!mb->wq) | 239 | if (!mb->wq) |
240 | return -ENOMEM; | 240 | return -ENOMEM; |
241 | 241 | ||