aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2009-04-02 13:47:41 -0400
committerPierre Ossman <pierre@ossman.eu>2009-06-13 16:42:57 -0400
commit7ceeb6a40a4dcc9b9cded6127ad5cdddb79b40ad (patch)
treeecd7f0907b2bf5ccf2f282c9297334e1c1b56060
parent5cf20aa557e8f9dd5af302b8f33972082479753a (diff)
mmc/omap: make mmci-omap using platform_driver_probe
A pointer to mmc_omap_probe which lives in .init.text is passed to the core via platform_driver_register and so the kernel might oops if probe is called after the init code is discarded. As requested by David Brownell platform_driver_probe is used instead of moving the probe function to .devinit.text. This saves some memory, but might have the downside that a device being registered after the call to mmc_omap_init but before the init sections are discarded will not be bound anymore to the driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
-rw-r--r--drivers/mmc/host/omap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index dceb5ee3bda0..e7a331de5733 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1593,7 +1593,6 @@ static int mmc_omap_resume(struct platform_device *pdev)
1593#endif 1593#endif
1594 1594
1595static struct platform_driver mmc_omap_driver = { 1595static struct platform_driver mmc_omap_driver = {
1596 .probe = mmc_omap_probe,
1597 .remove = mmc_omap_remove, 1596 .remove = mmc_omap_remove,
1598 .suspend = mmc_omap_suspend, 1597 .suspend = mmc_omap_suspend,
1599 .resume = mmc_omap_resume, 1598 .resume = mmc_omap_resume,
@@ -1605,7 +1604,7 @@ static struct platform_driver mmc_omap_driver = {
1605 1604
1606static int __init mmc_omap_init(void) 1605static int __init mmc_omap_init(void)
1607{ 1606{
1608 return platform_driver_register(&mmc_omap_driver); 1607 return platform_driver_probe(&mmc_omap_driver, mmc_omap_probe);
1609} 1608}
1610 1609
1611static void __exit mmc_omap_exit(void) 1610static void __exit mmc_omap_exit(void)