diff options
author | Bhaktipriya Shridhar <bhaktipriya96@gmail.com> | 2016-02-20 16:49:50 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 15:09:57 -0800 |
commit | 1761a85c3bed33591af9a4c2bfac1705c793143f (patch) | |
tree | fafb38c068bd7db37be5148a9360be53b716be67 /drivers/staging/rtl8192u/r8192U_core.c | |
parent | f59140964b1a1d71dec8b1e6f8dfc68afc2b4aec (diff) |
staging: rtl8192u: Remove create_workqueue()
With cmwq, use of dedicated workqueues can be replaced by system_wq.
Removed the dedicated workqueue and used system_wq instead.
Since the work items in the workqueues do not need to
be ordered, increase of concurrency by switching to system_wq should
not break anything.
All work items are sync canceled so it is guaranteed that no work is
running when driver is detached.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/r8192U_core.c')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 3c589636139a..3a93218f320b 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1962,7 +1962,7 @@ static int rtl8192_qos_handle_probe_response(struct r8192_priv *priv, network->qos_data.param_count)) { network->qos_data.old_param_count = network->qos_data.param_count; - queue_work(priv->priv_wq, &priv->qos_activate); + schedule_work(&priv->qos_activate); RT_TRACE(COMP_QOS, "QoS parameters change call qos_activate\n"); } @@ -1971,7 +1971,7 @@ static int rtl8192_qos_handle_probe_response(struct r8192_priv *priv, &def_qos_parameters, size); if ((network->qos_data.active == 1) && (active_network == 1)) { - queue_work(priv->priv_wq, &priv->qos_activate); + schedule_work(&priv->qos_activate); RT_TRACE(COMP_QOS, "QoS was disabled call qos_activate\n"); } @@ -1990,7 +1990,7 @@ static int rtl8192_handle_beacon(struct net_device *dev, struct r8192_priv *priv = ieee80211_priv(dev); rtl8192_qos_handle_probe_response(priv, 1, network); - queue_delayed_work(priv->priv_wq, &priv->update_beacon_wq, 0); + schedule_delayed_work(&priv->update_beacon_wq, 0); return 0; } @@ -2042,7 +2042,7 @@ static int rtl8192_qos_association_resp(struct r8192_priv *priv, network->flags, priv->ieee80211->current_network.qos_data.active); if (set_qos_param == 1) - queue_work(priv->priv_wq, &priv->qos_activate); + schedule_work(&priv->qos_activate); return 0; @@ -2387,7 +2387,6 @@ static void rtl8192_init_priv_task(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); - priv->priv_wq = create_workqueue(DRV_NAME); INIT_WORK(&priv->reset_wq, rtl8192_restart); @@ -3518,7 +3517,7 @@ static void watch_dog_timer_callback(unsigned long data) { struct r8192_priv *priv = ieee80211_priv((struct net_device *)data); - queue_delayed_work(priv->priv_wq, &priv->watch_dog_wq, 0); + schedule_delayed_work(&priv->watch_dog_wq, 0); mod_timer(&priv->watch_dog_timer, jiffies + msecs_to_jiffies(IEEE80211_WATCH_DOG_TIME)); } @@ -5022,7 +5021,6 @@ fail2: kfree(priv->pFirmware); priv->pFirmware = NULL; rtl8192_usb_deleteendpoints(dev); - destroy_workqueue(priv->priv_wq); mdelay(10); fail: free_ieee80211(dev); @@ -5060,7 +5058,6 @@ static void rtl8192_usb_disconnect(struct usb_interface *intf) kfree(priv->pFirmware); priv->pFirmware = NULL; rtl8192_usb_deleteendpoints(dev); - destroy_workqueue(priv->priv_wq); mdelay(10); } free_ieee80211(dev); |