From: Uwe Kleine-König Date: Fri, 18 Sep 2009 19:51:43 +0000 (-0700) Subject: mtd: nand: register orion_nand using platform_driver_probe() X-Git-Tag: v2.6.32-rc1~160^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f33dabbe79fdf7a8568c65faa1db7794c87ac4d3;p=pandora-kernel.git mtd: nand: register orion_nand using platform_driver_probe() 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-König Cc: Lennert Buytenhek Cc: Saeed Bishara Cc: Joern Engel Acked-by: Nicolas Pitre Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse --- Reading git-diff-tree failed