]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/ohci-ep93xx.c
usb host: fix platform driver hotplug/coldplug
[linux-2.6-omap-h63xx.git] / drivers / usb / host / ohci-ep93xx.c
index 6531c4d26527208eb6dac426a93d59ef36939546..156e93a9d0df3f3ee2ee96c7fc29241e9885a05c 100644 (file)
@@ -78,7 +78,7 @@ static int usb_hcd_ep93xx_probe(const struct hc_driver *driver,
 
        ohci_hcd_init(hcd_to_ohci(hcd));
 
-       retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT);
+       retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_DISABLED);
        if (retval == 0)
                return retval;
 
@@ -128,12 +128,14 @@ 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,
        .get_frame_number       = ohci_get_frame,
        .hub_status_data        = ohci_hub_status_data,
        .hub_control            = ohci_hub_control,
+       .hub_irq_enable         = ohci_rhsc_enable,
 #ifdef CONFIG_PM
        .bus_suspend            = ohci_bus_suspend,
        .bus_resume             = ohci_bus_resume,
@@ -167,7 +169,7 @@ static int ohci_hcd_ep93xx_drv_remove(struct platform_device *pdev)
 static int ohci_hcd_ep93xx_drv_suspend(struct platform_device *pdev, pm_message_t state)
 {
        struct usb_hcd *hcd = platform_get_drvdata(pdev);
-       struct ochi_hcd *ohci = hcd_to_ohci(hcd);
+       struct ohci_hcd *ohci = hcd_to_ohci(hcd);
 
        if (time_before(jiffies, ohci->next_statechange))
                msleep(5);
@@ -202,24 +204,15 @@ 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,
 #endif
        .driver         = {
                .name   = "ep93xx-ohci",
+               .owner  = THIS_MODULE,
        },
 };
 
-static int __init ohci_hcd_ep93xx_init(void)
-{
-       return platform_driver_register(&ohci_hcd_ep93xx_driver);
-}
-
-static void __exit ohci_hcd_ep93xx_cleanup(void)
-{
-       platform_driver_unregister(&ohci_hcd_ep93xx_driver);
-}
-
-module_init(ohci_hcd_ep93xx_init);
-module_exit(ohci_hcd_ep93xx_cleanup);
+MODULE_ALIAS("platform:ep93xx-ohci");