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/q40fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video/q40fb.c') diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index 4beac1df617b..de40a626dc76 100644 --- a/drivers/video/q40fb.c +++ b/drivers/video/q40fb.c @@ -85,7 +85,7 @@ static struct fb_ops q40fb_ops = { .fb_imageblit = cfb_imageblit, }; -static int __init q40fb_probe(struct platform_device *dev) +static int __devinit q40fb_probe(struct platform_device *dev) { struct fb_info *info; -- cgit v1.2.3