From f400cd8c84ba51e0ef3d9b680fe9f45ab54c792c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 22 Sep 2009 16:44:26 -0700 Subject: [PATCH] mmc: register mmci-omap-hs using platform_driver_probe MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Cc: Jean Pihet Cc: Tony Lindgren Cc: Pierre Ossman Cc: Andy Lowe Cc: Adrian Hunter Cc: Andrew Morton Acked-by: David Brownell Cc: Madhusudhan Chikkature Cc: Greg Kroah-Hartman Cc: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Philip Langdale Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/mmc/host/omap_hsmmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index fee895b..4b3af9e 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1314,7 +1314,6 @@ clk_en_err: #endif static struct platform_driver omap_mmc_driver = { - .probe = omap_mmc_probe, .remove = omap_mmc_remove, .suspend = omap_mmc_suspend, .resume = omap_mmc_resume, @@ -1327,7 +1326,7 @@ static struct platform_driver omap_mmc_driver = { static int __init omap_mmc_init(void) { /* Register the MMC driver */ - return platform_driver_register(&omap_mmc_driver); + return platform_driver_probe(&omap_mmc_driver, omap_mmc_probe); } static void __exit omap_mmc_cleanup(void) -- 1.8.2.3