diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-09-03 23:21:34 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-09-03 23:21:32 -0700 |
| commit | 5543865cef1fc6265771af042fdb07b7e93f991f (patch) | |
| tree | a4fd310a28b45b84772caff3a2f5ed43e2142f0c /drivers | |
| parent | 34b6804ae9302ce8b1f48391cd45110ac723172a (diff) | |
| parent | 652a8550db208a1f92f310a1ce9f04dda67f84c0 (diff) | |
Merge "msm: qcn: Synchronize card state change API"
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/platform/msm/qcn/qcn_sdio.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/platform/msm/qcn/qcn_sdio.c b/drivers/platform/msm/qcn/qcn_sdio.c index f926b660876c..e42109434557 100644 --- a/drivers/platform/msm/qcn/qcn_sdio.c +++ b/drivers/platform/msm/qcn/qcn_sdio.c @@ -1221,11 +1221,14 @@ int qcn_sdio_card_state(bool enable) mmc_try_claim_host(current_host, 2000); if (enable) { - ret = mmc_add_host(current_host); - if (ret) - pr_err("%s ret = %d\n", __func__, ret); + if (!atomic_read(&xport_status)) { + ret = mmc_add_host(current_host); + if (ret) + pr_err("%s ret = %d\n", __func__, ret); + } } else { - mmc_remove_host(current_host); + if (atomic_read(&xport_status)) + mmc_remove_host(current_host); } mmc_release_host(current_host); |
