summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorTony Lin <tony.lin@freescale.com>2012-02-13 12:58:39 +0800
committerTony Lin <tony.lin@freescale.com>2012-02-13 13:00:42 +0800
commit8eeae8d74532dc46873fbe38b7d8e40982852629 (patch)
tree76e3ffe5e165d97404177d7c7779230425a2049c /drivers/mmc
parentf1518f39c48d46ecfa5135a9b266858b799035f4 (diff)
ENGR00174307 [mx6 mmc]fix build warning
mmc/core/bus.c:189: warning: initialization from incompatible pointer type Signed-off-by: Tony Lin <tony.lin@freescale.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/card/block.c2
-rw-r--r--drivers/mmc/core/bus.c24
2 files changed, 8 insertions, 18 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index baae12af6513..ee31c5692df2 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1304,7 +1304,7 @@ static void mmc_blk_remove(struct mmc_card *card)
mmc_set_drvdata(card, NULL);
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int mmc_blk_suspend(struct mmc_card *card)
{
struct mmc_blk_data *part_md;
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 838286afe605..e0fa84b02237 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -120,6 +120,7 @@ static int mmc_bus_remove(struct device *dev)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
static int mmc_bus_suspend(struct device *dev)
{
struct mmc_driver *drv = to_mmc_driver(dev->driver);
@@ -141,9 +142,9 @@ static int mmc_bus_resume(struct device *dev)
ret = drv->resume(card);
return ret;
}
+#endif
#ifdef CONFIG_PM_RUNTIME
-
static int mmc_runtime_suspend(struct device *dev)
{
struct mmc_card *card = mmc_dev_to_card(dev);
@@ -162,23 +163,14 @@ static int mmc_runtime_idle(struct device *dev)
{
return pm_runtime_suspend(dev);
}
+#endif /* CONFIG_PM_RUNTIME */
static const struct dev_pm_ops mmc_bus_pm_ops = {
- .runtime_suspend = mmc_runtime_suspend,
- .runtime_resume = mmc_runtime_resume,
- .runtime_idle = mmc_runtime_idle,
- .suspend = mmc_bus_suspend,
- .resume = mmc_bus_resume,
+ SET_SYSTEM_SLEEP_PM_OPS(mmc_bus_suspend, mmc_bus_resume)
+ SET_RUNTIME_PM_OPS(mmc_runtime_suspend, mmc_runtime_resume,
+mmc_runtime_idle)
};
-#define MMC_PM_OPS_PTR (&mmc_bus_pm_ops)
-
-#else /* !CONFIG_PM_RUNTIME */
-
-#define MMC_PM_OPS_PTR NULL
-
-#endif /* !CONFIG_PM_RUNTIME */
-
static struct bus_type mmc_bus_type = {
.name = "mmc",
.dev_attrs = mmc_dev_attrs,
@@ -186,9 +178,7 @@ static struct bus_type mmc_bus_type = {
.uevent = mmc_bus_uevent,
.probe = mmc_bus_probe,
.remove = mmc_bus_remove,
- .suspend = mmc_bus_suspend,
- .resume = mmc_bus_resume,
- .pm = MMC_PM_OPS_PTR,
+ .pm = &mmc_bus_pm_ops,
};
int mmc_register_bus(void)