Merge branch 'master' into gfs2
[pandora-kernel.git] / drivers / usb / host / ohci-ppc-soc.c
index 2515333..d9d1ae2 100644 (file)
@@ -14,6 +14,9 @@
  * This file is licenced under the GPL.
  */
 
+#include <linux/platform_device.h>
+#include <linux/signal.h>
+
 /* configure so an HC device and id are always provided */
 /* always called with process context; sleeping is OK */
 
@@ -72,7 +75,7 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver,
        ohci->flags |= OHCI_BIG_ENDIAN;
        ohci_hcd_init(ohci);
 
-       retval = usb_add_hcd(hcd, irq, SA_INTERRUPT);
+       retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
        if (retval == 0)
                return retval;
 
@@ -145,6 +148,7 @@ static const struct hc_driver ohci_ppc_soc_hc_driver = {
         */
        .start =                ohci_ppc_soc_start,
        .stop =                 ohci_stop,
+       .shutdown =             ohci_shutdown,
 
        /*
         * managing i/o requests and associated device resources
@@ -163,16 +167,16 @@ static const struct hc_driver ohci_ppc_soc_hc_driver = {
         */
        .hub_status_data =      ohci_hub_status_data,
        .hub_control =          ohci_hub_control,
-#ifdef CONFIG_USB_SUSPEND
-       .hub_suspend =          ohci_hub_suspend,
-       .hub_resume =           ohci_hub_resume,
+       .hub_irq_enable =       ohci_rhsc_enable,
+#ifdef CONFIG_PM
+       .bus_suspend =          ohci_bus_suspend,
+       .bus_resume =           ohci_bus_resume,
 #endif
        .start_port_reset =     ohci_start_port_reset,
 };
 
-static int ohci_hcd_ppc_soc_drv_probe(struct device *dev)
+static int ohci_hcd_ppc_soc_drv_probe(struct platform_device *pdev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
        int ret;
 
        if (usb_disabled())
@@ -182,24 +186,26 @@ static int ohci_hcd_ppc_soc_drv_probe(struct device *dev)
        return ret;
 }
 
-static int ohci_hcd_ppc_soc_drv_remove(struct device *dev)
+static int ohci_hcd_ppc_soc_drv_remove(struct platform_device *pdev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct usb_hcd *hcd = dev_get_drvdata(dev);
+       struct usb_hcd *hcd = platform_get_drvdata(pdev);
 
        usb_hcd_ppc_soc_remove(hcd, pdev);
        return 0;
 }
 
-static struct device_driver ohci_hcd_ppc_soc_driver = {
-       .name           = "ppc-soc-ohci",
-       .bus            = &platform_bus_type,
+static struct platform_driver ohci_hcd_ppc_soc_driver = {
        .probe          = ohci_hcd_ppc_soc_drv_probe,
        .remove         = ohci_hcd_ppc_soc_drv_remove,
-#if    defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM)
+       .shutdown       = usb_hcd_platform_shutdown,
+#ifdef CONFIG_PM
        /*.suspend      = ohci_hcd_ppc_soc_drv_suspend,*/
        /*.resume       = ohci_hcd_ppc_soc_drv_resume,*/
 #endif
+       .driver         = {
+               .name   = "ppc-soc-ohci",
+               .owner  = THIS_MODULE,
+       },
 };
 
 static int __init ohci_hcd_ppc_soc_init(void)
@@ -208,12 +214,12 @@ static int __init ohci_hcd_ppc_soc_init(void)
        pr_debug("block sizes: ed %d td %d\n", sizeof(struct ed),
                                                        sizeof(struct td));
 
-       return driver_register(&ohci_hcd_ppc_soc_driver);
+       return platform_driver_register(&ohci_hcd_ppc_soc_driver);
 }
 
 static void __exit ohci_hcd_ppc_soc_cleanup(void)
 {
-       driver_unregister(&ohci_hcd_ppc_soc_driver);
+       platform_driver_unregister(&ohci_hcd_ppc_soc_driver);
 }
 
 module_init(ohci_hcd_ppc_soc_init);