From 6a0c4085e94f9c7f78a6bc52a9078a1f3c1cce59 Mon Sep 17 00:00:00 2001 From: Arnd Hannemann Date: Tue, 24 Aug 2010 17:27:01 +0200 Subject: [PATCH] --- yaml --- r: 220591 b: refs/heads/master c: 777271d0f33da306575ef776c75f66fc27246bf0 h: refs/heads/master i: 220589: adcef9c805a91c2ec3e56c574c8a5317f6a735f7 220587: 902b41143fa06da0c284f0a8a0af2d3840133241 220583: d003c4805cb3f6972e23e28587f37f7a8c6fc140 220575: 612d6883e3008ca39f3fe0e6f5963b36b7709345 v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/sh_mmcif.c | 12 ++++++++++++ trunk/include/linux/mmc/sh_mmcif.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6316becfebda..1b21ad498978 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 998283e2e359249133f2f47db26669a55ff25c98 +refs/heads/master: 777271d0f33da306575ef776c75f66fc27246bf0 diff --git a/trunk/drivers/mmc/host/sh_mmcif.c b/trunk/drivers/mmc/host/sh_mmcif.c index 0f06b8002814..ddd09840520b 100644 --- a/trunk/drivers/mmc/host/sh_mmcif.c +++ b/trunk/drivers/mmc/host/sh_mmcif.c @@ -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) diff --git a/trunk/include/linux/mmc/sh_mmcif.h b/trunk/include/linux/mmc/sh_mmcif.h index d4a2ebbdab4b..d19e2114fd86 100644 --- a/trunk/include/linux/mmc/sh_mmcif.h +++ b/trunk/include/linux/mmc/sh_mmcif.h @@ -34,6 +34,7 @@ struct sh_mmcif_plat_data { void (*set_pwr)(struct platform_device *pdev, int state); void (*down_pwr)(struct platform_device *pdev); + int (*get_cd)(struct platform_device *pdef); u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ unsigned long caps; u32 ocr;