[patch 5/8] mtd: register orion_nand using platform_driver_probe()

Artem Bityutskiy dedekind1 at gmail.com
Mon Aug 10 03:14:15 EDT 2009


On Thu, 2009-08-06 at 16:05 -0700, akpm at linux-foundation.org wrote:
> From: Uwe Kleine-Knig <u.kleine-koenig at pengutronix.de>
> 
> orion_nand_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 Nicolas Pitre 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-Knig <u.kleine-koenig at pengutronix.de>
> Cc: Lennert Buytenhek <buytenh at marvell.com>
> Cc: Saeed Bishara <saeed at marvell.com>
> Cc: Joern Engel <joern at logfs.org>
> Acked-by: Nicolas Pitre <nico at marvell.com>
> Cc: Greg Kroah-Hartman <gregkh at suse.de>
> Cc: David Woodhouse <dwmw2 at infradead.org>
> Signed-off-by: Andrew Morton <akpm at linux-foundation.org>

This one is in my l2-mtd-2.6.git.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list