diff options
author | Tony Lin <tony.lin@freescale.com> | 2012-02-13 12:58:39 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-07-20 13:22:38 +0800 |
commit | b6bdb1207b3c90a490be845b6e1ad2add179086b (patch) | |
tree | eddd16003a874a88a80cf41c0e336d60600eba07 | |
parent | 5f5507b4d6c6192b341d7b5b3f0f36fea073cbcb (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>
-rw-r--r-- | drivers/mmc/card/block.c | 2 | ||||
-rw-r--r-- | drivers/mmc/core/bus.c | 24 |
2 files changed, 8 insertions, 18 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index a87db1fda56f..e40003073232 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -1312,7 +1312,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) |