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

Commit c1b55bfc authored by Sascha Hauer's avatar Sascha Hauer Committed by Chris Ball
Browse files

mmc: Do not call get_cd for non removable cards



Non removable cards are always present, so do not call get_cd for them.

Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 07c001c1
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2460,7 +2460,8 @@ void mmc_rescan(struct work_struct *work)
	 */
	 */
	mmc_bus_put(host);
	mmc_bus_put(host);


	if (host->ops->get_cd && host->ops->get_cd(host) == 0) {
	if (!(host->caps & MMC_CAP_NONREMOVABLE) && host->ops->get_cd &&
			host->ops->get_cd(host) == 0) {
		mmc_claim_host(host);
		mmc_claim_host(host);
		mmc_power_off(host);
		mmc_power_off(host);
		mmc_release_host(host);
		mmc_release_host(host);