Skip to contentSkip to conversation

ARM: mmc: fix NONREMOVABLE test in sdhci-bcm-kona

PATCH Applied Christian Daudt 1 participant 2 messages Aug 7, 2013 – Aug 19, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mmc: fix NONREMOVABLE test in sdhci-bcm-kona

sdhci-bcm-kona driver is incorrectly doing "|" to bit-test NONREMOVABLE. Switch to "&"

drivers/mmc/host/sdhci-bcm-kona.c +2 -2
index 87175f9..9ffac0b 100644
@@ -263,7 +263,7 @@ static int __init sdhci_bcm_kona_probe(struct platform_device *pdev)
 		(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 (host->mmc->caps & MMC_CAP_NONREMOVABLE)
 		host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
 
 	dev_dbg(dev, "is_8bit=%c\n",
@@ -282,7 +282,7 @@ static int __init 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 (host->mmc->caps & MMC_CAP_NONREMOVABLE) {
 		ret = sdhci_bcm_kona_sd_card_emulate(host, 1);
 		if (ret) {
 			dev_err(dev,
Signature · 1 line
1.7.10.4
author Applied
#1 lore raw
Quoted 21 lines · Christian Daudt

sdhci-bcm-kona driver is incorrectly doing "|" to bit-test NONREMOVABLE. Switch to "&"

drivers/mmc/host/sdhci-bcm-kona.c +1 -1
index 87175f9..9ffac0b 100644
@@ -263,7 +263,7 @@ static int __init sdhci_bcm_kona_probe(struct platform_device *pdev)
  		(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 (host->mmc->caps & MMC_CAP_NONREMOVABLE)
  		host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
 
  	dev_dbg(dev, "is_8bit=%c\n",

drivers/mmc/host/sdhci-bcm-kona.c static int __init sdhci_bcm_kona_probe(struct platform_device *pdev) · line 288

Quoted 8 lines
drivers/mmc/host/sdhci-bcm-kona.c +1 -1
@@ -282,7 +282,7 @@ static int __init 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 (host->mmc->caps & MMC_CAP_NONREMOVABLE) {
  		ret = sdhci_bcm_kona_sd_card_emulate(host, 1);
  		if (ret) {
  			dev_err(dev,

applied to bcm/for-3.12/soc

thanks,
csd