summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/rtsx_pci_sdmmc.c
diff options
context:
space:
mode:
authorMicky Ching <micky_ching@realsil.com.cn>2014-12-23 04:19:43 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2015-01-19 11:56:19 +0300
commit2057647f0c8b84d7392469214bfcb5baf2e74498 (patch)
tree6c319bb3eac669bffc908c86c6026e1179eb2314 /drivers/mmc/host/rtsx_pci_sdmmc.c
parent755987f9a3e5d22a3aeeff37d8f25acf8f3d744d (diff)
downloadlinux-2057647f0c8b84d7392469214bfcb5baf2e74498.tar.xz
mmc: rtsx: init cookie at probe/card_event
host->cookie is used for handle async request, we should init it to negative value when new card inserted, make cookie value invalid. Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/rtsx_pci_sdmmc.c')
-rw-r--r--drivers/mmc/host/rtsx_pci_sdmmc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index b1390f02f128..90b7b6d5141d 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -1321,6 +1321,7 @@ static void rtsx_pci_sdmmc_card_event(struct platform_device *pdev)
{
struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev);
+ host->cookie = -1;
mmc_detect_change(host->mmc, 0);
}
@@ -1353,6 +1354,7 @@ static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev)
host->pcr = pcr;
host->mmc = mmc;
host->pdev = pdev;
+ host->cookie = -1;
host->power_state = SDMMC_POWER_OFF;
INIT_WORK(&host->work, sd_request);
platform_set_drvdata(pdev, host);