[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200904161353.48153.david-b@pacbell.net>
Date: Thu, 16 Apr 2009 13:53:47 -0700
From: David Brownell <david-b@...bell.net>
To: "Uwe Kleine-König"
<u.kleine-koenig@...gutronix.de>
Cc: linux-kernel@...r.kernel.org,
Grazvydas Ignotas <notasas@...il.com>,
Pierre Ossman <drzeus-mmc@...eus.cx>,
Tony Lindgren <tony@...mide.com>,
Russell King <rmk+kernel@....linux.org.uk>,
Paul Walmsley <paul@...an.com>,
Jarkko Lavinen <jarkko.lavinen@...ia.com>,
Hiroshi DOYU <Hiroshi.DOYU@...ia.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Carlos Eduardo Aguiar <carlos.aguiar@...t.org.br>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] make mmci-omap using platform_driver_probe
On Thursday 02 April 2009, Uwe Kleine-König wrote:
> 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.
One of the reasons I said to do it that way is that we *KNOW* it is
safe for thiis driver. That's a non-issue; no downside.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> Cc: Grazvydas Ignotas <notasas@...il.com>
> Cc: Pierre Ossman <drzeus-mmc@...eus.cx>
> Cc: David Brownell <dbrownell@...rs.sourceforge.net>
Acked-by: David Brownell <dbrownell@...rs.sourceforge.net>
> Cc: Tony Lindgren <tony@...mide.com>
> Cc: Russell King <rmk+kernel@....linux.org.uk>
> Cc: Paul Walmsley <paul@...an.com>
> Cc: Jarkko Lavinen <jarkko.lavinen@...ia.com>
> Cc: Hiroshi DOYU <Hiroshi.DOYU@...ia.com>
> Cc: Kyungmin Park <kyungmin.park@...sung.com>
> Cc: Carlos Eduardo Aguiar <carlos.aguiar@...t.org.br>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
>
> ---
> drivers/mmc/host/omap.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
> index 67d7b7f..004080e 100644
> --- a/drivers/mmc/host/omap.c
> +++ b/drivers/mmc/host/omap.c
> @@ -1601,7 +1601,6 @@ static int mmc_omap_resume(struct platform_device *pdev)
> #endif
>
> static struct platform_driver mmc_omap_driver = {
> - .probe = mmc_omap_probe,
> .remove = mmc_omap_remove,
> .suspend = mmc_omap_suspend,
> .resume = mmc_omap_resume,
> @@ -1613,7 +1612,7 @@ static struct platform_driver mmc_omap_driver = {
>
> static int __init mmc_omap_init(void)
> {
> - return platform_driver_register(&mmc_omap_driver);
> + return platform_driver_probe(&mmc_omap_driver, mmc_omap_probe);
> }
>
> static void __exit mmc_omap_exit(void)
> --
> tg: (5d80f8e..) t/platsection/mmc_omap_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