Commit 0b9992f7 authored by Bhaktipriya Shridhar's avatar Bhaktipriya Shridhar Committed by Sebastian Reichel

power: abx500_chargalg: Remove deprecated create_singlethread_workqueue

alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces
deprecated create_singlethread_workqueue(). This is the identity
conversion.

The workqueue "chargalg_wq" is used for running the charging algorithm.
It has multiple workitems viz &di->chargalg_periodic_work,
&di->chargalg_wd_work, &di->chargalg_work per abx500_chargalg, which
require ordering. It has been identity converted.

Also, WQ_MEM_RECLAIM has been set to ensure forward progress under
memory pressure.
Signed-off-by: default avatarBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 2ee565c9
...@@ -2091,8 +2091,8 @@ static int abx500_chargalg_probe(struct platform_device *pdev) ...@@ -2091,8 +2091,8 @@ static int abx500_chargalg_probe(struct platform_device *pdev)
abx500_chargalg_maintenance_timer_expired; abx500_chargalg_maintenance_timer_expired;
/* Create a work queue for the chargalg */ /* Create a work queue for the chargalg */
di->chargalg_wq = di->chargalg_wq = alloc_ordered_workqueue("abx500_chargalg_wq",
create_singlethread_workqueue("abx500_chargalg_wq"); WQ_MEM_RECLAIM);
if (di->chargalg_wq == NULL) { if (di->chargalg_wq == NULL) {
dev_err(di->dev, "failed to create work queue\n"); dev_err(di->dev, "failed to create work queue\n");
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment