]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ath10k: destroy sdio workqueue while remove sdio module
authorWen Gong <wgong@codeaurora.org>
Thu, 27 Jun 2019 18:21:51 +0000 (21:21 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 28 Jun 2019 19:12:59 +0000 (22:12 +0300)
The workqueue need to flush and destory while remove sdio module,
otherwise it will have thread which is not destory after remove
sdio modules.

Tested with QCA6174 SDIO with firmware
WLAN.RMH.4.4.1-00007-QCARMSWP-1.

Signed-off-by: Wen Gong <wgong@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/sdio.c

index 08bbbc9933be07e33c4a8bf58f6ce45633b740ab..8ed4fbd8d6c3888de629010ca5f758c66259a9d2 100644 (file)
@@ -2097,6 +2097,9 @@ static void ath10k_sdio_remove(struct sdio_func *func)
 
        ath10k_core_unregister(ar);
        ath10k_core_destroy(ar);
+
+       flush_workqueue(ar_sdio->workqueue);
+       destroy_workqueue(ar_sdio->workqueue);
 }
 
 static const struct sdio_device_id ath10k_sdio_devices[] = {