diff options
author | Bhaktipriya Shridhar <bhaktipriya96@gmail.com> | 2016-08-13 18:36:33 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2016-08-16 00:54:37 +0200 |
commit | b732ace40a1d5ea643ee9c28116e829ae950fe8f (patch) | |
tree | a91b3ce9d750d1f6a6ae1dd323098f3c57fe5db8 /drivers | |
parent | power: ab8500_fg: Remove deprecated create_singlethread_workqueue (diff) | |
download | linux-b732ace40a1d5ea643ee9c28116e829ae950fe8f.tar.xz linux-b732ace40a1d5ea643ee9c28116e829ae950fe8f.zip |
power: ds2760_battery: 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 "monitor_wqueue" is used to monitor the battery
status. It has been identity converted.
It queues multiple work items viz &di->monitor_work,
&di->set_charged_work, which require execution ordering.
Hence, alloc_workqueue has been used to replace the
deprecated create_singlethread_workqueue instance.
WQ_MEM_RECLAIM flag has been set to ensure forward progress under
memory pressure.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/supply/ds2760_battery.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/supply/ds2760_battery.c b/drivers/power/supply/ds2760_battery.c index 369ab00bf453..17225689e3f6 100644 --- a/drivers/power/supply/ds2760_battery.c +++ b/drivers/power/supply/ds2760_battery.c @@ -566,7 +566,8 @@ static int ds2760_battery_probe(struct platform_device *pdev) INIT_DELAYED_WORK(&di->monitor_work, ds2760_battery_work); INIT_DELAYED_WORK(&di->set_charged_work, ds2760_battery_set_charged_work); - di->monitor_wqueue = create_singlethread_workqueue(dev_name(&pdev->dev)); + di->monitor_wqueue = alloc_ordered_workqueue(dev_name(&pdev->dev), + WQ_MEM_RECLAIM); if (!di->monitor_wqueue) { retval = -ESRCH; goto workqueue_failed; |