From a6e06940982f7bd2dcb359036222dbc4c3abe9df Mon Sep 17 00:00:00 2001 From: Frank Liu Date: Mon, 26 Jun 2017 15:51:12 +0800 Subject: [PATCH] qcacmn: fix start modules fail on sdio card When open sdio bus, "probed" will be checked and increased, but it's not decreased in close sdio bus, so if driver goes through hdd_wlan_startup -> hdd_wlan_stop_modules -> __hdd_open process, it will fail to open the sdio bus and to bring up the interface. The fix is to remove the static variable, since the check is trivial for two reason: 1. driver control flow guarantee no re-enter; 2. if re-enter happen, it is no harm. Change-Id: Ie701fb44732600440aa70ff28f62fe766d4271e7 CRs-Fixed: 2066582 --- hif/src/sdio/if_sdio.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hif/src/sdio/if_sdio.c b/hif/src/sdio/if_sdio.c index 204625085462..65ba4d6fb387 100644 --- a/hif/src/sdio/if_sdio.c +++ b/hif/src/sdio/if_sdio.c @@ -307,7 +307,6 @@ static char *dev_info = "ath_hif_sdio"; */ static int init_ath_hif_sdio(void) { - static int probed; QDF_STATUS status; struct osdrv_callbacks osdrv_callbacks; @@ -319,10 +318,6 @@ static int init_ath_hif_sdio(void) osdrv_callbacks.device_resume_handler = hif_sdio_resume; osdrv_callbacks.device_power_change_handler = hif_sdio_power_change; - if (probed) - return -ENODEV; - probed++; - QDF_TRACE(QDF_MODULE_ID_HIF, QDF_TRACE_LEVEL_INFO, "%s %d", __func__, __LINE__); status = hif_init(&osdrv_callbacks);