mmc: core: Invoke mmc_power_up/off with claim_host acquired

mmc_power_up/off() would be processed by the platform driver,
so we should ensure that platform driver is in resume state before
invoking these calls. Acquire mmc_claim_host before invoking
mmc_power_up/off() which explicitly resumes platform device.

In prior version kernels, platform device was getting resumed in
mmc_set_ios which gets called by mmc_power_up/down().
But on 4.9 onwards, it was consolidated and added in mmc_claim_host().
So this requirement has arisen only here.

Change-Id: I548bd55e41465a84472081542446b036ebd877a0
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
This commit is contained in:
Veerabhadrarao Badiganti 2018-04-07 19:08:46 +05:30 committed by Gerrit - the friendly Code Review server
parent ae56b6a5c4
commit 8a1f0c2093

View File

@ -4472,7 +4472,9 @@ int mmc_power_save_host(struct mmc_host *host)
mmc_bus_put(host);
mmc_claim_host(host);
mmc_power_off(host);
mmc_release_host(host);
return ret;
}
@ -4491,8 +4493,8 @@ int mmc_power_restore_host(struct mmc_host *host)
return -EINVAL;
}
mmc_power_up(host, host->card->ocr);
mmc_claim_host(host);
mmc_power_up(host, host->card->ocr);
ret = host->bus_ops->power_restore(host);
mmc_release_host(host);