]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/mmc/host/sh_mmcif.c
mmc: Allow the platform to specify the sh_mmcif get_cd handler
[net-next-2.6.git] / drivers / mmc / host / sh_mmcif.c
index 0f06b80028141939fad056c35c3166d70d7eb6f0..ddd09840520b69c5cba9d5673c3d6e1b51abeed4 100644 (file)
@@ -710,9 +710,21 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
        host->bus_width = ios->bus_width;
 }
 
+static int sh_mmcif_get_cd(struct mmc_host *mmc)
+{
+       struct sh_mmcif_host *host = mmc_priv(mmc);
+       struct sh_mmcif_plat_data *p = host->pd->dev.platform_data;
+
+       if (!p->get_cd)
+               return -ENOSYS;
+       else
+               return p->get_cd(host->pd);
+}
+
 static struct mmc_host_ops sh_mmcif_ops = {
        .request        = sh_mmcif_request,
        .set_ios        = sh_mmcif_set_ios,
+       .get_cd         = sh_mmcif_get_cd,
 };
 
 static void sh_mmcif_detect(struct mmc_host *mmc)