projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'backport/v3.14.24-ltsi-rc1/phy-rcar-gen2-usb-to-v3.15' into backport/v3...
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
drivers
/
mmc
/
host
/
tmio_mmc.c
diff --git
a/drivers/mmc/host/tmio_mmc.c
b/drivers/mmc/host/tmio_mmc.c
index
1900abb
..
659028d
100644
(file)
--- a/
drivers/mmc/host/tmio_mmc.c
+++ b/
drivers/mmc/host/tmio_mmc.c
@@
-23,38
+23,37
@@
#include "tmio_mmc.h"
#include "tmio_mmc.h"
-#ifdef CONFIG_PM
-static int tmio_mmc_suspend(struct
platform_device *dev, pm_message_t state
)
+#ifdef CONFIG_PM
_SLEEP
+static int tmio_mmc_suspend(struct
device *dev
)
{
{
- const struct mfd_cell *cell = mfd_get_cell(dev);
+ struct platform_device *pdev = to_platform_device(dev);
+ const struct mfd_cell *cell = mfd_get_cell(pdev);
int ret;
int ret;
- ret =
tmio_mmc_host_suspend(&dev->
dev);
+ ret =
pm_runtime_force_suspend(
dev);
/* Tell MFD core it can disable us now.*/
if (!ret && cell->disable)
/* Tell MFD core it can disable us now.*/
if (!ret && cell->disable)
- cell->disable(dev);
+ cell->disable(
p
dev);
return ret;
}
return ret;
}
-static int tmio_mmc_resume(struct
platform_
device *dev)
+static int tmio_mmc_resume(struct device *dev)
{
{
- const struct mfd_cell *cell = mfd_get_cell(dev);
+ struct platform_device *pdev = to_platform_device(dev);
+ const struct mfd_cell *cell = mfd_get_cell(pdev);
int ret = 0;
/* Tell the MFD core we are ready to be enabled */
if (cell->resume)
int ret = 0;
/* Tell the MFD core we are ready to be enabled */
if (cell->resume)
- ret = cell->resume(dev);
+ ret = cell->resume(
p
dev);
if (!ret)
if (!ret)
- ret =
tmio_mmc_host_resume(&dev->
dev);
+ ret =
pm_runtime_force_resume(
dev);
return ret;
}
return ret;
}
-#else
-#define tmio_mmc_suspend NULL
-#define tmio_mmc_resume NULL
#endif
static int tmio_mmc_probe(struct platform_device *pdev)
#endif
static int tmio_mmc_probe(struct platform_device *pdev)
@@
-134,15
+133,21
@@
static int tmio_mmc_remove(struct platform_device *pdev)
/* ------------------- device registration ----------------------- */
/* ------------------- device registration ----------------------- */
+static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(tmio_mmc_suspend, tmio_mmc_resume)
+ SET_PM_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
+ tmio_mmc_host_runtime_resume,
+ NULL)
+};
+
static struct platform_driver tmio_mmc_driver = {
.driver = {
.name = "tmio-mmc",
.owner = THIS_MODULE,
static struct platform_driver tmio_mmc_driver = {
.driver = {
.name = "tmio-mmc",
.owner = THIS_MODULE,
+ .pm = &tmio_mmc_dev_pm_ops,
},
.probe = tmio_mmc_probe,
.remove = tmio_mmc_remove,
},
.probe = tmio_mmc_probe,
.remove = tmio_mmc_remove,
- .suspend = tmio_mmc_suspend,
- .resume = tmio_mmc_resume,
};
module_platform_driver(tmio_mmc_driver);
};
module_platform_driver(tmio_mmc_driver);