Commit 8ffb2611 authored by Wolfram Sang's avatar Wolfram Sang Committed by Ulf Hansson
Browse files

mmc: host: factor out clearing the retune state

parent 68249abd
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -941,8 +941,7 @@ int mmc_execute_tuning(struct mmc_card *card)
		pr_err("%s: tuning execution failed: %d\n",
			mmc_hostname(host), err);
	} else {
		host->retune_now = 0;
		host->need_retune = 0;
		mmc_retune_clear(host);
		mmc_retune_enable(host);
	}

+1 −2
Original line number Diff line number Diff line
@@ -142,8 +142,7 @@ void mmc_retune_disable(struct mmc_host *host)
	mmc_retune_unpause(host);
	host->can_retune = 0;
	del_timer_sync(&host->retune_timer);
	host->retune_now = 0;
	host->need_retune = 0;
	mmc_retune_clear(host);
}

void mmc_retune_timer_stop(struct mmc_host *host)
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,12 @@ int mmc_retune(struct mmc_host *host);
void mmc_retune_pause(struct mmc_host *host);
void mmc_retune_unpause(struct mmc_host *host);

static inline void mmc_retune_clear(struct mmc_host *host)
{
	host->retune_now = 0;
	host->need_retune = 0;
}

static inline void mmc_retune_hold_now(struct mmc_host *host)
{
	host->retune_now = 0;