iwlwifi: dvm: use alloc_ordered_workqueue()
authorEva Rachel Retuya <eraretuya@gmail.com>
Sat, 19 Mar 2016 05:15:47 +0000 (05:15 +0000)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 30 Mar 2016 13:21:27 +0000 (16:21 +0300)
Use alloc_ordered_workqueue() to allocate the workqueue instead of
create_singlethread_workqueue() since the latter is deprecated and is scheduled
for removal.

There are work items doing related operations that shouldn't be swapped when
queued in a certain order hence preserve the strict execution ordering of a
single threaded (ST) workqueue by switching to alloc_ordered_workqueue().

WQ_MEM_RECLAIM flag is not needed since the worker is not depended
during memory reclaim.

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/intel/iwlwifi/dvm/main.c

index 85628127947fb251712710b1c81868975c4d0404..614716251c39e402f5507a895050e751f367a90a 100644 (file)
@@ -1071,7 +1071,7 @@ static void iwl_bg_restart(struct work_struct *data)
 
 static void iwl_setup_deferred_work(struct iwl_priv *priv)
 {
-       priv->workqueue = create_singlethread_workqueue(DRV_NAME);
+       priv->workqueue = alloc_ordered_workqueue(DRV_NAME, 0);
 
        INIT_WORK(&priv->restart, iwl_bg_restart);
        INIT_WORK(&priv->beacon_update, iwl_bg_beacon_update);