From adcef9c805a91c2ec3e56c574c8a5317f6a735f7 Mon Sep 17 00:00:00 2001 From: Arnd Hannemann Date: Tue, 24 Aug 2010 17:26:59 +0200 Subject: [PATCH] --- yaml --- r: 220589 b: refs/heads/master c: 19ca7502c508595edfb963e5dbcf62854a926506 h: refs/heads/master i: 220587: 902b41143fa06da0c284f0a8a0af2d3840133241 v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/tmio_mmc.c | 13 +++++++++++++ trunk/include/linux/mfd/tmio.h | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 64f4e46430fc..0653d7aa3c48 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9b16c0a43b74393cc18666a7748293812c61af1f +refs/heads/master: 19ca7502c508595edfb963e5dbcf62854a926506 diff --git a/trunk/drivers/mmc/host/tmio_mmc.c b/trunk/drivers/mmc/host/tmio_mmc.c index 69d98e3bf6ab..1a47221d01a4 100644 --- a/trunk/drivers/mmc/host/tmio_mmc.c +++ b/trunk/drivers/mmc/host/tmio_mmc.c @@ -756,10 +756,23 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)) ? 0 : 1; } +static int tmio_mmc_get_cd(struct mmc_host *mmc) +{ + struct tmio_mmc_host *host = mmc_priv(mmc); + struct mfd_cell *cell = host->pdev->dev.platform_data; + struct tmio_mmc_data *pdata = cell->driver_data; + + if (!pdata->get_cd) + return -ENOSYS; + else + return pdata->get_cd(host->pdev); +} + static const struct mmc_host_ops tmio_mmc_ops = { .request = tmio_mmc_request, .set_ios = tmio_mmc_set_ios, .get_ro = tmio_mmc_get_ro, + .get_cd = tmio_mmc_get_cd, }; #ifdef CONFIG_PM diff --git a/trunk/include/linux/mfd/tmio.h b/trunk/include/linux/mfd/tmio.h index f07425bc3dcd..24c43bbad541 100644 --- a/trunk/include/linux/mfd/tmio.h +++ b/trunk/include/linux/mfd/tmio.h @@ -74,6 +74,7 @@ struct tmio_mmc_data { struct tmio_mmc_dma *dma; void (*set_pwr)(struct platform_device *host, int state); void (*set_clk_div)(struct platform_device *host, int state); + int (*get_cd)(struct platform_device *host); }; /*