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

Commit 0aa55c23 authored by Seungwon Jeon's avatar Seungwon Jeon Committed by Chris Ball
Browse files

mmc: sdhci-s3c: fix the card detection in runtime-pm



If host clock is disabled, host cannot detect a card in case of using
CD internal for detection.

Signed-off-by: default avatarSeungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 0f310a05
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -747,6 +747,7 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
		sdhci_s3c_setup_card_detect_gpio(sc);

#ifdef CONFIG_PM_RUNTIME
	if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL)
		clk_disable_unprepare(sc->clk_io);
#endif
	return 0;
@@ -794,6 +795,7 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
		gpio_free(sc->ext_cd_gpio);

#ifdef CONFIG_PM_RUNTIME
	if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL)
		clk_prepare_enable(sc->clk_io);
#endif
	sdhci_remove_host(host, 1);