]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00174307 [mx6 mmc]fix build warning
authorTony Lin <tony.lin@freescale.com>
Mon, 13 Feb 2012 04:58:39 +0000 (12:58 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:00 +0000 (08:34 +0200)
mmc/core/bus.c:189: warning: initialization from incompatible pointer type

Signed-off-by: Tony Lin <tony.lin@freescale.com>
drivers/mmc/card/block.c
drivers/mmc/core/bus.c

index a87db1fda56f84689e9ebb3759d8ff2a13588cbb..e40003073232b75f77fbc09f61f4bbb589e517e9 100644 (file)
@@ -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;
index 838286afe605f7e42248a8016f73a3cf84bf8826..e0fa84b02237b918c7899008165338a53b29d9b4 100644 (file)
@@ -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)