Merge "mmc: host: Add device_prepare pm for mmc_host"
This commit is contained in:
commit
4e432f6b70
1 changed files with 19 additions and 0 deletions
|
@ -52,9 +52,28 @@ static void mmc_host_classdev_release(struct device *dev)
|
||||||
kfree(host);
|
kfree(host);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int mmc_host_prepare(struct device *dev)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Since mmc_host is a virtual device, we don't have to do anything.
|
||||||
|
* If we return a positive value, the pm framework will consider that
|
||||||
|
* the runtime suspend and system suspend of this device is same and
|
||||||
|
* will set direct_complete flag as true. We don't want this as the
|
||||||
|
* mmc_host always has positive disable_depth and setting the flag
|
||||||
|
* will not speed up the suspend process.
|
||||||
|
* So return 0.
|
||||||
|
*/
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct dev_pm_ops mmc_pm_ops = {
|
||||||
|
.prepare = mmc_host_prepare,
|
||||||
|
};
|
||||||
|
|
||||||
static struct class mmc_host_class = {
|
static struct class mmc_host_class = {
|
||||||
.name = "mmc_host",
|
.name = "mmc_host",
|
||||||
.dev_release = mmc_host_classdev_release,
|
.dev_release = mmc_host_classdev_release,
|
||||||
|
.pm = &mmc_pm_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
int mmc_register_host_class(void)
|
int mmc_register_host_class(void)
|
||||||
|
|
Loading…
Add table
Reference in a new issue