]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/mmc/core/sd.c
mmc: add module parameter to set whether cards are assumed removable
[linux-beck.git] / drivers / mmc / core / sd.c
index 10b2a4d20f5a1a6b270592d6b048514126bda96a..fdd414eded09a9eef14968a59d026e369c046aa5 100644 (file)
@@ -606,23 +606,6 @@ static void mmc_sd_power_restore(struct mmc_host *host)
        mmc_release_host(host);
 }
 
-#ifdef CONFIG_MMC_UNSAFE_RESUME
-
-static const struct mmc_bus_ops mmc_sd_ops = {
-       .remove = mmc_sd_remove,
-       .detect = mmc_sd_detect,
-       .suspend = mmc_sd_suspend,
-       .resume = mmc_sd_resume,
-       .power_restore = mmc_sd_power_restore,
-};
-
-static void mmc_sd_attach_bus_ops(struct mmc_host *host)
-{
-       mmc_attach_bus(host, &mmc_sd_ops);
-}
-
-#else
-
 static const struct mmc_bus_ops mmc_sd_ops = {
        .remove = mmc_sd_remove,
        .detect = mmc_sd_detect,
@@ -643,15 +626,13 @@ static void mmc_sd_attach_bus_ops(struct mmc_host *host)
 {
        const struct mmc_bus_ops *bus_ops;
 
-       if (host->caps & MMC_CAP_NONREMOVABLE)
+       if (host->caps & MMC_CAP_NONREMOVABLE || !mmc_assume_removable)
                bus_ops = &mmc_sd_ops_unsafe;
        else
                bus_ops = &mmc_sd_ops;
        mmc_attach_bus(host, bus_ops);
 }
 
-#endif
-
 /*
  * Starting point for SD card init.
  */