mmc: core: Use MMC_UNSAFE_RESUME as default behavior
[firefly-linux-kernel-4.4.55.git] / drivers / mmc / core / sd.c
index 692fdb177294c242f3df6c9e1313df0584f100b3..2dd359d2242fa811efae1a03d02ca9d9dfba77ca 100644 (file)
@@ -1207,16 +1207,6 @@ static int mmc_sd_power_restore(struct mmc_host *host)
 }
 
 static const struct mmc_bus_ops mmc_sd_ops = {
-       .remove = mmc_sd_remove,
-       .detect = mmc_sd_detect,
-       .suspend = NULL,
-       .resume = NULL,
-       .power_restore = mmc_sd_power_restore,
-       .alive = mmc_sd_alive,
-       .shutdown = mmc_sd_suspend,
-};
-
-static const struct mmc_bus_ops mmc_sd_ops_unsafe = {
        .remove = mmc_sd_remove,
        .detect = mmc_sd_detect,
        .runtime_suspend = mmc_sd_runtime_suspend,
@@ -1228,17 +1218,6 @@ static const struct mmc_bus_ops mmc_sd_ops_unsafe = {
        .shutdown = mmc_sd_suspend,
 };
 
-static void mmc_sd_attach_bus_ops(struct mmc_host *host)
-{
-       const struct mmc_bus_ops *bus_ops;
-
-       if (!mmc_card_is_removable(host))
-               bus_ops = &mmc_sd_ops_unsafe;
-       else
-               bus_ops = &mmc_sd_ops;
-       mmc_attach_bus(host, bus_ops);
-}
-
 /*
  * Starting point for SD card init.
  */
@@ -1254,7 +1233,7 @@ int mmc_attach_sd(struct mmc_host *host)
        if (err)
                return err;
 
-       mmc_sd_attach_bus_ops(host);
+       mmc_attach_bus(host, &mmc_sd_ops);
        if (host->ocr_avail_sd)
                host->ocr_avail = host->ocr_avail_sd;