summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorSachin Nikam <snikam@nvidia.com>2012-03-02 18:54:07 +0530
committerSimone Willett <swillett@nvidia.com>2012-03-06 18:02:10 -0800
commit080f0ec0b61087f61249aaa15b0a873bac86d287 (patch)
treeb6eaa82ed8af575f02f12bb0fc7a9e7c1ac500bd /drivers/mmc
parentc2723e948f91cac068fe9f6b473270e97829915e (diff)
Hack: mmc: explicitly invoking mmc_test probe from bus drv
Bug 930113 Change-Id: I15fede503217152263905d8f7f56d3392e460e8a Signed-off-by: Sachin Nikam <snikam@nvidia.com> Reviewed-on: http://git-master/r/87241 Reviewed-by: Shridhar Rasal <srasal@nvidia.com> Tested-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/bus.c15
1 files changed, 15 insertions, 0 deletions
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);
}