mmc: core: Use MMC_UNSAFE_RESUME as default behavior
[firefly-linux-kernel-4.4.55.git] / drivers / mmc / core / mmc.c
index 98e9eb0f6643149f6b589cb1319b2a0a0905ee1d..20f0468952287cc18a33dc5080d7c680101539e2 100644 (file)
@@ -1634,16 +1634,6 @@ static int mmc_power_restore(struct mmc_host *host)
 }
 
 static const struct mmc_bus_ops mmc_ops = {
-       .remove = mmc_remove,
-       .detect = mmc_detect,
-       .suspend = NULL,
-       .resume = NULL,
-       .power_restore = mmc_power_restore,
-       .alive = mmc_alive,
-       .shutdown = mmc_shutdown,
-};
-
-static const struct mmc_bus_ops mmc_ops_unsafe = {
        .remove = mmc_remove,
        .detect = mmc_detect,
        .suspend = mmc_suspend,
@@ -1655,17 +1645,6 @@ static const struct mmc_bus_ops mmc_ops_unsafe = {
        .shutdown = mmc_shutdown,
 };
 
-static void mmc_attach_bus_ops(struct mmc_host *host)
-{
-       const struct mmc_bus_ops *bus_ops;
-
-       if (!mmc_card_is_removable(host))
-               bus_ops = &mmc_ops_unsafe;
-       else
-               bus_ops = &mmc_ops;
-       mmc_attach_bus(host, bus_ops);
-}
-
 /*
  * Starting point for MMC card init.
  */
@@ -1685,7 +1664,7 @@ int mmc_attach_mmc(struct mmc_host *host)
        if (err)
                return err;
 
-       mmc_attach_bus_ops(host);
+       mmc_attach_bus(host, &mmc_ops);
        if (host->ocr_avail_mmc)
                host->ocr_avail = host->ocr_avail_mmc;