Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c79396c1 authored by Adrian Hunter's avatar Adrian Hunter Committed by Chris Ball
Browse files

mmc: sdhci: prevent card detection activity for non-removable cards



Do not enable card detection interrupts for non-removable cards.

Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent ceb6143b
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -146,10 +146,9 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)
{
	u32 present, irqs;

	if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
		return;

	if (host->quirks2 & SDHCI_QUIRK2_OWN_CARD_DETECTION)
	if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
	    (host->quirks2 & SDHCI_QUIRK2_OWN_CARD_DETECTION) ||
	    !mmc_card_is_removable(host->mmc))
		return;

	present = sdhci_readl(host, SDHCI_PRESENT_STATE) &