diff options
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 37842b6..95ea862 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -351,9 +351,12 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, mmc->slots[0].features |= HSMMC_HAS_48MHZ_MASTER_CLK; } - if (c->mmc_data) + if (c->mmc_data) { memcpy(&mmc->slots[0].mmc_data, c->mmc_data, sizeof(struct mmc_platform_data)); + mmc->slots[0].card_detect = + (mmc_card_detect_func)c->mmc_data->status; + } /* * NOTE: MMC slots should have a Vcc regulator set up. diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h index 4bb6fbd..2cbe0f9 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h @@ -10,6 +10,8 @@ struct mmc_card; +typedef int (*mmc_card_detect_func)(struct device *dev, int slot); + struct omap2_hsmmc_info { u8 mmc; /* controller 1/2/3 */ u32 caps; /* 4/8 wires and any additional host |