From c2e13037e6794bd0d9de3f9ecabf5615f15c160b Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König 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/w100fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video/w100fb.c') diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c index 2376f688ec8b..5d223959778a 100644 --- a/drivers/video/w100fb.c +++ b/drivers/video/w100fb.c @@ -628,7 +628,7 @@ static int w100fb_resume(struct platform_device *dev) #endif -int __init w100fb_probe(struct platform_device *pdev) +int __devinit w100fb_probe(struct platform_device *pdev) { int err = -EIO; struct w100fb_mach_info *inf; -- cgit v1.2.3-59-g8ed1b