On Monday 14 February 2011 00:52:08 Shawn Guo wrote: > I rewriting the code to use mmc core card detect polling framework. > > static int mxs_mmc_get_cd(struct mmc_host *mmc) > { > struct mxs_mmc_host *host = mmc_priv(mmc); > > return !(readl(host->base + HW_SSP_STATUS) & > BM_SSP_STATUS_CARD_DETECT); > } > > static const struct mmc_host_ops mxs_mmc_ops = { > ... > .get_cd = mxs_mmc_get_cd, > }; > > static int mxs_mmc_probe(struct platform_device *pdev) > { > ... > mmc_caps |= MMC_CAP_NEEDS_POLL; > ... > } > > It looks pretty simple and mmc core code has taken care of the case > of power management. So if this looks fine to you, I will go for it > in v2 of the patch set. Yes, that looks very good. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html