adm5120: remove __dev{init,exit} annotations
[openwrt/openwrt.git] / target / linux / adm5120 / files / drivers / usb / host / adm5120-drv.c
index 208416e03d3ce8502d045610f36d5224b4db25cf..798fd2208106a3520fdfa8366531215c75022c14 100644 (file)
@@ -1,21 +1,25 @@
 /*
- * OHCI HCD (Host Controller Driver) for USB.
+ * ADM5120 HCD (Host Controller Driver) for USB
  *
- * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
- * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
- * (C) Copyright 2002 Hewlett-Packard Company
+ * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
  *
- * Bus Glue for AMD Alchemy Au1xxx
+ * This file was derived from: drivers/usb/host/ohci-au1xxx.c
+ *   (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ *   (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ *   (C) Copyright 2002 Hewlett-Packard Company
  *
- * Written by Christopher Hoover <ch@hpl.hp.com>
- * Based on fragments of previous driver by Rusell King et al.
+ *   Written by Christopher Hoover <ch@hpl.hp.com>
+ *   Based on fragments of previous driver by Russell King et al.
  *
- * Modified for LH7A404 from ahcd-sa1111.c
- *  by Durgesh Pattamatta <pattamattad@sharpsec.com>
- * Modified for AMD Alchemy Au1xxx
- *  by Matt Porter <mporter@kernel.crashing.org>
+ *   Modified for LH7A404 from ahcd-sa1111.c
+ *    by Durgesh Pattamatta <pattamattad@sharpsec.com>
+ *   Modified for AMD Alchemy Au1xxx
+ *    by Matt Porter <mporter@kernel.crashing.org>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
  *
- * This file is licenced under the GPL.
  */
 
 #include <linux/platform_device.h>
@@ -77,7 +81,7 @@ static int admhc_adm5120_probe(const struct hc_driver *driver,
 
        admhc_hcd_init(hcd_to_admhcd(hcd));
 
-       retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
+       retval = usb_add_hcd(hcd, irq, 0);
        if (retval)
                goto err_io;
 
@@ -105,12 +109,9 @@ static void admhc_adm5120_remove(struct usb_hcd *hcd,
        usb_put_hcd(hcd);
 }
 
-/*-------------------------------------------------------------------------*/
-
-static int __devinit
-admhc_adm5120_start(struct usb_hcd *hcd)
+static int admhc_adm5120_start(struct usb_hcd *hcd)
 {
-       struct admhcd   *ahcd = hcd_to_admhcd (hcd);
+       struct admhcd   *ahcd = hcd_to_admhcd(hcd);
        int             ret;
 
        ret = admhc_init(ahcd);
@@ -133,8 +134,6 @@ err:
        return ret;
 }
 
-/*-------------------------------------------------------------------------*/
-
 static const struct hc_driver adm5120_hc_driver = {
        .description =          hcd_name,
        .product_desc =         "ADM5120 built-in USB 1.1 Host Controller",
@@ -163,30 +162,24 @@ static const struct hc_driver adm5120_hc_driver = {
        /*
         * scheduling support
         */
-       .get_frame_number =     admhc_get_frame,
+       .get_frame_number =     admhc_get_frame_number,
 
        /*
         * root hub support
         */
        .hub_status_data =      admhc_hub_status_data,
        .hub_control =          admhc_hub_control,
-       .hub_irq_enable =       admhc_rhsc_enable,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM
        .bus_suspend =          admhc_bus_suspend,
        .bus_resume =           admhc_bus_resume,
 #endif
        .start_port_reset =     admhc_start_port_reset,
 };
 
-/*-------------------------------------------------------------------------*/
-
 static int usb_hcd_adm5120_probe(struct platform_device *pdev)
 {
        int ret;
 
-       if (mips_machgroup != MACH_GROUP_ADM5120)
-               return -ENODEV;
-
        ret = admhc_adm5120_probe(&adm5120_hc_driver, pdev);
 
        return ret;
@@ -201,7 +194,7 @@ static int usb_hcd_adm5120_remove(struct platform_device *pdev)
        return 0;
 }
 
-#if 0
+#ifdef CONFIG_PM
 /* TODO */
 static int usb_hcd_adm5120_suspend(struct platform_device *dev)
 {
@@ -216,17 +209,17 @@ static int usb_hcd_adm5120_resume(struct platform_device *dev)
 
        return 0;
 }
-#endif
+#else
+#define usb_hcd_adm5120_suspend        NULL
+#define usb_hcd_adm5120_resume NULL
+#endif /* CONFIG_PM */
 
 static struct platform_driver usb_hcd_adm5120_driver = {
        .probe          = usb_hcd_adm5120_probe,
        .remove         = usb_hcd_adm5120_remove,
        .shutdown       = usb_hcd_platform_shutdown,
-#if 0
-       /* TODO */
        .suspend        = usb_hcd_adm5120_suspend,
        .resume         = usb_hcd_adm5120_resume,
-#endif
        .driver         = {
                .name   = "adm5120-hcd",
                .owner  = THIS_MODULE,