From 080f0ec0b61087f61249aaa15b0a873bac86d287 Mon Sep 17 00:00:00 2001 From: Sachin Nikam Date: Fri, 2 Mar 2012 18:54:07 +0530 Subject: Hack: mmc: explicitly invoking mmc_test probe from bus drv Bug 930113 Change-Id: I15fede503217152263905d8f7f56d3392e460e8a Signed-off-by: Sachin Nikam Reviewed-on: http://git-master/r/87241 Reviewed-by: Shridhar Rasal Tested-by: Shridhar Rasal Reviewed-by: Juha Tukkinen Reviewed-by: Bharat Nihalani --- drivers/mmc/core/bus.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers') diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index e07d6c90caec..f4bdbe6982c9 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -25,6 +25,10 @@ #define to_mmc_driver(d) container_of(d, struct mmc_driver, drv) +#ifdef CONFIG_MMC_TEST +static struct mmc_driver *mmc_test_drv; +#endif + static ssize_t mmc_type_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -107,6 +111,13 @@ static int mmc_bus_probe(struct device *dev) struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); +#ifdef CONFIG_MMC_TEST + /* + * Hack: Explicitly invoking mmc_test probe to co-exist with mmcblk driver. + */ + mmc_test_drv->probe(card); +#endif + return drv->probe(card); } @@ -196,6 +207,10 @@ void mmc_unregister_bus(void) int mmc_register_driver(struct mmc_driver *drv) { drv->drv.bus = &mmc_bus_type; +#ifdef CONFIG_MMC_TEST + if (!strcmp(drv->drv.name, "mmc_test")) + mmc_test_drv = drv; +#endif return driver_register(&drv->drv); } -- cgit v1.2.3