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

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

Merge "mmc: sdhci: Remove redundant runtime PM calls" into msm-4.9

parents dff446df 8620ab92
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
@@ -58,20 +58,6 @@ static void sdhci_enable_sdio_irq_nolock(struct sdhci_host *host, int enable);

static void sdhci_enable_preset_value(struct sdhci_host *host, bool enable);

#ifdef CONFIG_PM
static int sdhci_runtime_pm_get(struct sdhci_host *host);
static int sdhci_runtime_pm_put(struct sdhci_host *host);
#else
static inline int sdhci_runtime_pm_get(struct sdhci_host *host)
{
	return 0;
}
static inline int sdhci_runtime_pm_put(struct sdhci_host *host)
{
	return 0;
}
#endif

static void sdhci_dump_state(struct sdhci_host *host)
{
	struct mmc_host *mmc = host->mmc;
@@ -1780,7 +1766,6 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
		host->mrq = NULL;
		sdhci_dumpregs(host);
		mmc_request_done(host->mmc, mrq);
		sdhci_runtime_pm_put(host);
		return;
	}

@@ -2373,10 +2358,8 @@ static int sdhci_enhanced_strobe(struct mmc_host *mmc)
	struct sdhci_host *host = mmc_priv(mmc);
	int err = 0;

	sdhci_runtime_pm_get(host);
	if (host->ops->enhanced_strobe)
		err = host->ops->enhanced_strobe(host);
	sdhci_runtime_pm_put(host);

	return err;
}
@@ -2726,9 +2709,7 @@ static void sdhci_force_err_irq(struct mmc_host *mmc, u64 errmask)
	u16 mask = errmask & 0xFFFF;

	pr_err("%s: Force raise error mask:0x%04x\n", __func__, mask);
	sdhci_runtime_pm_get(host);
	sdhci_writew(host, mask, SDHCI_SET_INT_ERROR);
	sdhci_runtime_pm_put(host);
}

static const struct mmc_host_ops sdhci_ops = {
@@ -3514,17 +3495,6 @@ int sdhci_resume_host(struct sdhci_host *host)

EXPORT_SYMBOL_GPL(sdhci_resume_host);

static int sdhci_runtime_pm_get(struct sdhci_host *host)
{
	return pm_runtime_get_sync(host->mmc->parent);
}

static int sdhci_runtime_pm_put(struct sdhci_host *host)
{
	pm_runtime_mark_last_busy(host->mmc->parent);
	return pm_runtime_put_autosuspend(host->mmc->parent);
}

int sdhci_runtime_suspend_host(struct sdhci_host *host)
{
	unsigned long flags;