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

Commit 578aebc7 authored by Ulf Hansson's avatar Ulf Hansson Committed by Chris Ball
Browse files

mmc: mmci: Move away from using deprecated APIs



Suspend and resume of cards are being handled from the protocol layer
and consequently the mmc_suspend|resume_host APIs are deprecated.

This means we can simplify the suspend|resume callbacks by removing the
use of the deprecated APIs.

Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent ccad9b97
Loading
Loading
Loading
Loading
+4 −13
Original line number Original line Diff line number Diff line
@@ -1725,37 +1725,28 @@ static int mmci_suspend(struct device *dev)
{
{
	struct amba_device *adev = to_amba_device(dev);
	struct amba_device *adev = to_amba_device(dev);
	struct mmc_host *mmc = amba_get_drvdata(adev);
	struct mmc_host *mmc = amba_get_drvdata(adev);
	int ret = 0;


	if (mmc) {
	if (mmc) {
		struct mmci_host *host = mmc_priv(mmc);
		struct mmci_host *host = mmc_priv(mmc);

		ret = mmc_suspend_host(mmc);
		if (ret == 0) {
		pm_runtime_get_sync(dev);
		pm_runtime_get_sync(dev);
		writel(0, host->base + MMCIMASK0);
		writel(0, host->base + MMCIMASK0);
	}
	}
	}


	return ret;
	return 0;
}
}


static int mmci_resume(struct device *dev)
static int mmci_resume(struct device *dev)
{
{
	struct amba_device *adev = to_amba_device(dev);
	struct amba_device *adev = to_amba_device(dev);
	struct mmc_host *mmc = amba_get_drvdata(adev);
	struct mmc_host *mmc = amba_get_drvdata(adev);
	int ret = 0;


	if (mmc) {
	if (mmc) {
		struct mmci_host *host = mmc_priv(mmc);
		struct mmci_host *host = mmc_priv(mmc);

		writel(MCI_IRQENABLE, host->base + MMCIMASK0);
		writel(MCI_IRQENABLE, host->base + MMCIMASK0);
		pm_runtime_put(dev);
		pm_runtime_put(dev);

		ret = mmc_resume_host(mmc);
	}
	}


	return ret;
	return 0;
}
}
#endif
#endif