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

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

Merge "mmc: mmc: Add clk_hold/release pair before caching host->ios"

parents f295d9e7 e192a2bd
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2389,9 +2389,16 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend)
		goto out;

	if (mmc_can_sleepawake(host)) {
		/*
		 * For caching host->ios to cached_ios we need to
		 * make sure that clocks are not gated otherwise
		 * cached_ios->clock will be 0.
		 */
		mmc_host_clk_hold(host);
		memcpy(&host->cached_ios, &host->ios, sizeof(host->cached_ios));
		mmc_cache_card_ext_csd(host);
		err = mmc_sleepawake(host, true);
		mmc_host_clk_release(host);
	} else if (!mmc_host_is_spi(host)) {
		err = mmc_deselect_cards(host);
	}