Skip to content

Commit

Permalink
power: ab8500_btemp: Remove deprecated create_singlethread_workqueue
Browse files Browse the repository at this point in the history
The workqueue "btemp_wq" is used for measuring the temperature
periodically. It queues a single workitem (btemp_periodic_work) and
hence doesn't require ordering. Thus, the deprecated
create_singlethread_workqueue() instance has been replaced with
alloc_workqueue().

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 <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
bhaktipriya authored and sre committed Aug 15, 2016
1 parent 0b9992f commit a8dd5b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/supply/ab8500_btemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ static int ab8500_btemp_probe(struct platform_device *pdev)

/* Create a work queue for the btemp */
di->btemp_wq =
create_singlethread_workqueue("ab8500_btemp_wq");
alloc_workqueue("ab8500_btemp_wq", WQ_MEM_RECLAIM, 0);
if (di->btemp_wq == NULL) {
dev_err(di->dev, "failed to create work queue\n");
return -ENOMEM;
Expand Down

0 comments on commit a8dd5b6

Please sign in to comment.