From 64a21d025d3a979a8715f2ec7acabca7b5406c8a Mon Sep 17 00:00:00 2001 From: Aleksey Gorelov Date: Tue, 8 Aug 2006 17:24:08 -0700 Subject: USB: Properly unregister reboot notifier in case of failure in ehci hcd If some problem occurs during ehci startup, for instance, request_irq fails, echi hcd driver tries it best to cleanup, but fails to unregister reboot notifier, which in turn leads to crash on reboot/poweroff. The following patch resolves this problem by not using reboot notifiers anymore, but instead making ehci/ohci driver get its own shutdown method. For PCI, it is done through pci glue, for everything else through platform driver glue. One downside: sa1111 does not use platform driver stuff, and does not have its own shutdown hook, so no 'shutdown' is called for it now. I'm not sure if it is really necessary on that platform, though. Signed-off-by: Aleks Gorelov Cc: Alan Stern Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-ep93xx.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/usb/host/ohci-ep93xx.c') diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c index 1a1d320b799..1bf5e7a4e73 100644 --- a/drivers/usb/host/ohci-ep93xx.c +++ b/drivers/usb/host/ohci-ep93xx.c @@ -128,6 +128,7 @@ static struct hc_driver ohci_ep93xx_hc_driver = { .flags = HCD_USB11 | HCD_MEMORY, .start = ohci_ep93xx_start, .stop = ohci_stop, + .shutdown = ohci_shutdown, .urb_enqueue = ohci_urb_enqueue, .urb_dequeue = ohci_urb_dequeue, .endpoint_disable = ohci_endpoint_disable, @@ -203,6 +204,7 @@ static int ohci_hcd_ep93xx_drv_resume(struct platform_device *pdev) static struct platform_driver ohci_hcd_ep93xx_driver = { .probe = ohci_hcd_ep93xx_drv_probe, .remove = ohci_hcd_ep93xx_drv_remove, + .shutdown = usb_hcd_platform_shutdown, #ifdef CONFIG_PM .suspend = ohci_hcd_ep93xx_drv_suspend, .resume = ohci_hcd_ep93xx_drv_resume, -- cgit v1.2.3