libertas: Remove create_workqueue
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Sat, 4 Jun 2016 13:59:01 +0000 (19:29 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 16 Jun 2016 15:22:18 +0000 (18:22 +0300)
commitf9f905b00b878243e1e3cbe32b920f86a8aaa68e
tree5fa1e233bfc8b55f9e3f7091070f10b925282017
parent2a734451028670cf8c14e233b79d95fd3df99bca
libertas: Remove create_workqueue

alloc_workqueue replaces deprecated create_workqueue().

In if_sdio.c, the workqueue card->workqueue has workitem
&card->packet_worker, which is mapped to if_sdio_host_to_card_worker.
The workitem is involved in sending packets to firmware.
Forward progress under memory pressure is a requirement here.

In if_spi.c, the workqueue card->workqueue has workitem
&card->packet_worker, which is mapped to if_spi_host_to_card_worker.
The workitem is involved in sending command packets from the host.
Forward progress under memory pressure is a requirement here.

Dedicated workqueues have been used in both cases since the workitems
on the workqueues are involved in normal device operation with
WQ_MEM_RECLAIM set to gurantee forward progress under memory pressure.
Since there are only a fixed number of work items, explicit concurrency
limit is unnecessary.

flush_workqueue is unnecessary since destroy_workqueue() itself calls
drain_workqueue() which flushes repeatedly till the workqueue
becomes empty. Hence the calls to flush_workqueue() before
destroy_workqueue() have been dropped.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/libertas/if_sdio.c
drivers/net/wireless/marvell/libertas/if_spi.c