From 860951c5f0f5caf595799d98b93a8304bf70f08d Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Tue, 21 Jun 2016 10:13:26 +0900 Subject: mmc: host: use the defined function to check whether card is removable In linux/mmc/host.h, mmc_card_is_removable() is already defined. It should be maintainted more easier than now. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci-bcm-kona.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/mmc/host/sdhci-bcm-kona.c') diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index 00a8a40a3729..1d6471284ae4 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -264,12 +264,12 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev) } dev_dbg(dev, "non-removable=%c\n", - (host->mmc->caps & MMC_CAP_NONREMOVABLE) ? 'Y' : 'N'); + mmc_card_is_removable(host->mmc) ? 'N' : 'Y'); dev_dbg(dev, "cd_gpio %c, wp_gpio %c\n", (mmc_gpio_get_cd(host->mmc) != -ENOSYS) ? 'Y' : 'N', (mmc_gpio_get_ro(host->mmc) != -ENOSYS) ? 'Y' : 'N'); - if (host->mmc->caps & MMC_CAP_NONREMOVABLE) + if (!mmc_card_is_removable(host->mmc)) host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION; dev_dbg(dev, "is_8bit=%c\n", @@ -288,7 +288,7 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev) } /* if device is eMMC, emulate card insert right here */ - if (host->mmc->caps & MMC_CAP_NONREMOVABLE) { + if (!mmc_card_is_removable(host->mmc)) { ret = sdhci_bcm_kona_sd_card_emulate(host, 1); if (ret) { dev_err(dev, -- cgit v1.2.3