mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
mmc: core: Add shutdown callback for (e)MMC bus_ops
The shutdown sequence of an (e)MMC is very similar to a suspend. We re-use the suspend function and tell it we are not in suspend context. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
parent
03d071fc8d
commit
486fdbbc14
1 changed files with 10 additions and 0 deletions
|
@ -1508,6 +1508,14 @@ static int mmc_suspend(struct mmc_host *host)
|
|||
return _mmc_suspend(host, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* Shutdown callback
|
||||
*/
|
||||
static int mmc_shutdown(struct mmc_host *host)
|
||||
{
|
||||
return _mmc_suspend(host, false);
|
||||
}
|
||||
|
||||
/*
|
||||
* Resume callback from host.
|
||||
*
|
||||
|
@ -1597,6 +1605,7 @@ static const struct mmc_bus_ops mmc_ops = {
|
|||
.resume = NULL,
|
||||
.power_restore = mmc_power_restore,
|
||||
.alive = mmc_alive,
|
||||
.shutdown = mmc_shutdown,
|
||||
};
|
||||
|
||||
static const struct mmc_bus_ops mmc_ops_unsafe = {
|
||||
|
@ -1608,6 +1617,7 @@ static const struct mmc_bus_ops mmc_ops_unsafe = {
|
|||
.runtime_resume = mmc_runtime_resume,
|
||||
.power_restore = mmc_power_restore,
|
||||
.alive = mmc_alive,
|
||||
.shutdown = mmc_shutdown,
|
||||
};
|
||||
|
||||
static void mmc_attach_bus_ops(struct mmc_host *host)
|
||||
|
|
Loading…
Reference in a new issue