From c2e13037e6794bd0d9de3f9ecabf5615f15c160b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 4 Feb 2010 20:56:51 +0100 Subject: platform-drivers: move probe to .devinit.text in drivers/video MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A pointer to a probe callback is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König Cc: Adrian Bunk Cc: Alberto Mardegan Cc: Andrew Morton Cc: Andriy Skulysh Cc: Antonino Daplas Cc: Anton Vorontsov Cc: Ben Dooks Cc: Chandramouli Narayanan Cc: Christoph Hellwig Cc: Frans Pop Cc: Geert Uytterhoeven Cc: Greg Kroah-Hartman Cc: Helge Deller Cc: Huang Ying Cc: Ian Molton Cc: Joshua Kinard Cc: Kaj-Michael Lang Cc: Krzysztof Helt Cc: linux-fbdev-devel@lists.sourceforge.net Cc: Maciej W. Rozycki Cc: Magnus Damm Cc: Martin Michlmayr Cc: Matthias Kaehlcke Cc: Paul Mundt Cc: Pavel Machek Cc: Philipp Zabel Cc: Richard Purdie Cc: Roel Kluin Cc: Roland Stigge Cc: Russell King Cc: Thomas Bogendoerfer Cc: Vincent Sanders Cc: Yoichi Yuasa Acked-by: Ralf Baechle Acked-by: Arnaud Patard Acked-by: James Simmons Acked-by: Peter Jones Acked-by: Jaya Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/video/cobalt_lcdfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video/cobalt_lcdfb.c') diff --git a/drivers/video/cobalt_lcdfb.c b/drivers/video/cobalt_lcdfb.c index 108b89e09a8..5eb61b5adfe 100644 --- a/drivers/video/cobalt_lcdfb.c +++ b/drivers/video/cobalt_lcdfb.c @@ -287,7 +287,7 @@ static struct fb_ops cobalt_lcd_fbops = { .fb_cursor = cobalt_lcdfb_cursor, }; -static int __init cobalt_lcdfb_probe(struct platform_device *dev) +static int __devinit cobalt_lcdfb_probe(struct platform_device *dev) { struct fb_info *info; struct resource *res; -- cgit v1.2.3