aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2009-09-22 19:44:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:33 -0400
commitf400cd8c84ba51e0ef3d9b680fe9f45ab54c792c (patch)
tree81ba11ed234569ec723b59fe42f5e0c08e304ac7
parentb5a74d6058e86546868242bb5283e16fb10fd90a (diff)
mmc: register mmci-omap-hs using platform_driver_probe
omap_mmc_probe lives in .init.text, so using platform_driver_register to register it is wrong because binding a device after the init memory is discarded (e.g. via sysfs) results in an oops. As requested by David Brownell platform_driver_probe is used instead of moving the probe function to .devinit.text as proposed initially. This saves some memory, but devices registered after the driver is probed are not bound (probably there are none) and binding via sysfs isn't possible. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Jean Pihet <jpihet@mvista.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Pierre Ossman <drzeus@drzeus.cx> Cc: Andy Lowe <alowe@mvista.com> Cc: Adrian Hunter <ext-adrian.hunter@nokia.com> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Madhusudhan Chikkature<madhu.cr@ti.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Matt Fleming <matt@console-pimps.org> Cc: Ian Molton <ian@mnementh.co.uk> Cc: "Roberto A. Foglietta" <roberto.foglietta@gmail.com> Cc: Philip Langdale <philipl@overt.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/mmc/host/omap_hsmmc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index fee895b02f39..4b3af9e11b7b 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1314,7 +1314,6 @@ clk_en_err:
1314#endif 1314#endif
1315 1315
1316static struct platform_driver omap_mmc_driver = { 1316static struct platform_driver omap_mmc_driver = {
1317 .probe = omap_mmc_probe,
1318 .remove = omap_mmc_remove, 1317 .remove = omap_mmc_remove,
1319 .suspend = omap_mmc_suspend, 1318 .suspend = omap_mmc_suspend,
1320 .resume = omap_mmc_resume, 1319 .resume = omap_mmc_resume,
@@ -1327,7 +1326,7 @@ static struct platform_driver omap_mmc_driver = {
1327static int __init omap_mmc_init(void) 1326static int __init omap_mmc_init(void)
1328{ 1327{
1329 /* Register the MMC driver */ 1328 /* Register the MMC driver */
1330 return platform_driver_register(&omap_mmc_driver); 1329 return platform_driver_probe(&omap_mmc_driver, omap_mmc_probe);
1331} 1330}
1332 1331
1333static void __exit omap_mmc_cleanup(void) 1332static void __exit omap_mmc_cleanup(void)