diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2009-03-27 19:26:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:40 -0400 |
commit | dc2f2b7505c195a6963fc07b549e269eee417261 (patch) | |
tree | c4dfbc394dc233d58e2a01952cf162b8b55dcf33 | |
parent | 8864bd8606508f6cb66bb0668250cc0672060b65 (diff) |
USB: move orion-ehci's probe function to .devinit.text
A pointer to ehci_orion_drv_probe 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 <u.kleine-koenig@pengutronix.de>
Cc: Ronen Shitrit <rshitrit@marvell.com>
Cc: Lennert Buytenhek <buytenh@marvell.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: Nicolas Pitre <nico@marvell.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Tzachi Perelstein <tzachi@marvell.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/host/ehci-orion.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index 9d487908012e..17dc15407a07 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -187,7 +187,7 @@ ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, | |||
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
190 | static int __init ehci_orion_drv_probe(struct platform_device *pdev) | 190 | static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) |
191 | { | 191 | { |
192 | struct orion_ehci_data *pd = pdev->dev.platform_data; | 192 | struct orion_ehci_data *pd = pdev->dev.platform_data; |
193 | struct resource *res; | 193 | struct resource *res; |