aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>2016-08-13 12:35:00 -0400
committerSebastian Reichel <sre@kernel.org>2016-08-15 18:54:37 -0400
commit1c53f3709cbc0da9fbf83bb10b2e3633ade05875 (patch)
tree985cd483be717800bae9c16c7fe7e6bee6d583ed
parent829f0e97cc03b0c834cc5f86ff72b2ec389020ef (diff)
power: ab8500_fg: 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 "fg_wq" is used for running the FG algorithm periodically. It has been identity converted. It has multiple work items viz fg_periodic_work, fg_low_bat_work, fg_reinit_work, fg_work, fg_acc_cur_work and fg_check_hw_failure_work, which require execution ordering. Hence, a dedicated ordered workqueue has been used here. The WQ_MEM_RECLAIM flag has been set to guarantee forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
-rw-r--r--drivers/power/supply/ab8500_fg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index 5a36cf88578a..199f2dbb0044 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -3096,7 +3096,7 @@ static int ab8500_fg_probe(struct platform_device *pdev)
3096 ab8500_fg_discharge_state_to(di, AB8500_FG_DISCHARGE_INIT); 3096 ab8500_fg_discharge_state_to(di, AB8500_FG_DISCHARGE_INIT);
3097 3097
3098 /* Create a work queue for running the FG algorithm */ 3098 /* Create a work queue for running the FG algorithm */
3099 di->fg_wq = create_singlethread_workqueue("ab8500_fg_wq"); 3099 di->fg_wq = alloc_ordered_workqueue("ab8500_fg_wq", WQ_MEM_RECLAIM);
3100 if (di->fg_wq == NULL) { 3100 if (di->fg_wq == NULL) {
3101 dev_err(di->dev, "failed to create work queue\n"); 3101 dev_err(di->dev, "failed to create work queue\n");
3102 return -ENOMEM; 3102 return -ENOMEM;