[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200907221038.08162.david-b@pacbell.net>
Date: Wed, 22 Jul 2009 10:38:07 -0700
From: David Brownell <david-b@...bell.net>
To: "Uwe Kleine-König"
<u.kleine-koenig@...gutronix.de>
Cc: linux-kernel@...r.kernel.org, Jean Pihet <jpihet@...sta.com>,
Tony Lindgren <tony@...mide.com>,
Pierre Ossman <drzeus@...eus.cx>, Andy Lowe <alowe@...sta.com>,
Adrian Hunter <ext-adrian.hunter@...ia.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Madhusudhan Chikkature <madhu.cr@...com>,
"Greg Kroah-Hartman" <gregkh@...e.de>
Subject: Re: [PATCH] register mmci-omap-hs using platform_driver_probe
On Tuesday 21 July 2009, Uwe Kleine-König wrote:
> 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@...gutronix.de>
> Cc: Jean Pihet <jpihet@...sta.com>
> Cc: Tony Lindgren <tony@...mide.com>
> Cc: Pierre Ossman <drzeus@...eus.cx>
> Cc: Andy Lowe <alowe@...sta.com>
> Cc: Adrian Hunter <ext-adrian.hunter@...ia.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: David Brownell <dbrownell@...rs.sourceforge.net>
Acked-by: David Brownell <dbrownell@...rs.sourceforge.net>
> Cc: Madhusudhan Chikkature<madhu.cr@...com>
> Cc: Greg Kroah-Hartman <gregkh@...e.de>
>
> ---
> drivers/mmc/host/omap_hsmmc.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 1cf9cfb..40d9830 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -1307,7 +1307,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,
> @@ -1320,7 +1319,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)
> --
> tg: (4b0a840..) t/platsection/omap_mmc_driver (depends on: linus/master)
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists