From: Tony Lin Date: Mon, 13 Feb 2012 04:58:39 +0000 (+0800) Subject: ENGR00174307 [mx6 mmc]fix build warning X-Git-Tag: v3.0.35-fsl~1489 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3cac53846b545e753f7c8eb175653e3676801a0a;p=karo-tx-linux.git ENGR00174307 [mx6 mmc]fix build warning mmc/core/bus.c:189: warning: initialization from incompatible pointer type Signed-off-by: Tony Lin --- 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)