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

Commit c167ab30 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: sd: Set card state to removed upon ejection"

parents 88623cb4 3794773d
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1318,6 +1318,7 @@ static int _mmc_sd_resume(struct mmc_host *host)
		goto out;

	if (host->ops->get_cd && !host->ops->get_cd(host)) {
		err = -ENOMEDIUM;
		mmc_card_clr_suspended(host->card);
		goto out;
	}
@@ -1417,14 +1418,16 @@ static int mmc_sd_runtime_suspend(struct mmc_host *host)
 */
static int mmc_sd_runtime_resume(struct mmc_host *host)
{
	int err;
	int err = 0;

	err = _mmc_sd_resume(host);
	if (err && err != -ENOMEDIUM)
	if (err) {
		pr_err("%s: error %d doing runtime resume\n",
			mmc_hostname(host), err);

	return 0;
		if (err == -ENOMEDIUM)
			mmc_card_set_removed(host->card);
	}
	return err;
}

static int mmc_sd_reset(struct mmc_host *host)