From: Wen Gong Date: Thu, 27 Jun 2019 18:21:51 +0000 (+0300) Subject: ath10k: destroy sdio workqueue while remove sdio module X-Git-Tag: v5.3-rc1~140^2~52^2^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ed39f8e747a7aafeec07bb244f2c3a1bdca5730;p=thirdparty%2Flinux.git ath10k: destroy sdio workqueue while remove sdio module 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 Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index 08bbbc9933be0..8ed4fbd8d6c38 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -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[] = {