mmc: core: Disable card detect during shutdown
[linux-2.6-microblaze.git] / drivers / mmc / core / host.c
index d4683b1..cf140f4 100644 (file)
@@ -80,9 +80,18 @@ static void mmc_host_classdev_release(struct device *dev)
        kfree(host);
 }
 
+static int mmc_host_classdev_shutdown(struct device *dev)
+{
+       struct mmc_host *host = cls_dev_to_mmc_host(dev);
+
+       __mmc_stop_host(host);
+       return 0;
+}
+
 static struct class mmc_host_class = {
        .name           = "mmc_host",
        .dev_release    = mmc_host_classdev_release,
+       .shutdown_pre   = mmc_host_classdev_shutdown,
        .pm             = MMC_HOST_CLASS_DEV_PM_OPS,
 };