USB: EHCI, OHCI, UHCI: remove version numbers
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 2 Oct 2008 15:47:15 +0000 (11:47 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 17 Oct 2008 21:41:02 +0000 (14:41 -0700)
This patch (as1145) removes the essentially useless driver-version
strings from ehci-hcd, ohci-hcd, and uhci-hcd.  It also unifies the
form of the banner lines they display upon loading and adds a missing
test for usb_disabled() to ehci-hcd.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-dbg.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ohci-dbg.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-pnx4008.c
drivers/usb/host/uhci-hcd.c

index 5d57773e730efe3299c7f145d87357b770946f41..0cb53ca8d3434c521162e7e1461a01c6c13d7677 100644 (file)
@@ -675,7 +675,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
 
        if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
                size = scnprintf (next, size,
-                       "bus %s, device %s (driver " DRIVER_VERSION ")\n"
+                       "bus %s, device %s\n"
                        "%s\n"
                        "SUSPENDED (no register access)\n",
                        hcd->self.controller->bus->name,
@@ -687,7 +687,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
        /* Capability Registers */
        i = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase));
        temp = scnprintf (next, size,
-               "bus %s, device %s (driver " DRIVER_VERSION ")\n"
+               "bus %s, device %s\n"
                "%s\n"
                "EHCI %x.%02x, hcd state %d\n",
                hcd->self.controller->bus->name,
index c6f9961eed3ce11683e2c2819aa7230b0f8b1634..fcbc1f2b2377d510b60bdaf301c10e0349adb6bb 100644 (file)
@@ -60,7 +60,6 @@
  * providing early devices for those host controllers to talk to!
  */
 
-#define DRIVER_VERSION "10 Dec 2004"
 #define DRIVER_AUTHOR "David Brownell"
 #define DRIVER_DESC "USB 2.0 'Enhanced' Host Controller (EHCI) Driver"
 
@@ -621,9 +620,9 @@ static int ehci_run (struct usb_hcd *hcd)
 
        temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase));
        ehci_info (ehci,
-               "USB %x.%x started, EHCI %x.%02x, driver %s%s\n",
+               "USB %x.%x started, EHCI %x.%02x%s\n",
                ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f),
-               temp >> 8, temp & 0xff, DRIVER_VERSION,
+               temp >> 8, temp & 0xff,
                ignore_oc ? ", overcurrent ignored" : "");
 
        ehci_writel(ehci, INTR_MASK,
@@ -995,9 +994,7 @@ static int ehci_get_frame (struct usb_hcd *hcd)
 
 /*-------------------------------------------------------------------------*/
 
-#define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC
-
-MODULE_DESCRIPTION (DRIVER_INFO);
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_AUTHOR (DRIVER_AUTHOR);
 MODULE_LICENSE ("GPL");
 
@@ -1045,6 +1042,10 @@ static int __init ehci_hcd_init(void)
 {
        int retval = 0;
 
+       if (usb_disabled())
+               return -ENODEV;
+
+       printk(KERN_INFO "%s: " DRIVER_DESC "\n", hcd_name);
        pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
                 hcd_name,
                 sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
index 7cef1d2f7cccc9417672e1fc77d209b978154a41..d3269656aa4d8c81036b6e5880123c42a254c821 100644 (file)
@@ -649,7 +649,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
        ohci_dbg_sw (ohci, &next, &size,
                "bus %s, device %s\n"
                "%s\n"
-               "%s version " DRIVER_VERSION "\n",
+               "%s\n",
                hcd->self.controller->bus->name,
                dev_name(hcd->self.controller),
                hcd->product_desc,
index 89901962cbfd821bc454353f61ed1e4e66ecf8db..0afeda836df33ca4579ed0cb4bd4fd45f1e6e84a 100644 (file)
@@ -46,7 +46,6 @@
 
 #include "../core/hcd.h"
 
-#define DRIVER_VERSION "2006 August 04"
 #define DRIVER_AUTHOR "Roman Weissgaerber, David Brownell"
 #define DRIVER_DESC "USB 1.1 'Open' Host Controller (OHCI) Driver"
 
@@ -984,10 +983,8 @@ static int ohci_restart (struct ohci_hcd *ohci)
 
 /*-------------------------------------------------------------------------*/
 
-#define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC
-
 MODULE_AUTHOR (DRIVER_AUTHOR);
-MODULE_DESCRIPTION (DRIVER_INFO);
+MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE ("GPL");
 
 #ifdef CONFIG_PCI
@@ -1095,7 +1092,7 @@ static int __init ohci_hcd_mod_init(void)
        if (usb_disabled())
                return -ENODEV;
 
-       printk (KERN_DEBUG "%s: " DRIVER_INFO "\n", hcd_name);
+       printk(KERN_INFO "%s: " DRIVER_DESC "\n", hcd_name);
        pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name,
                sizeof (struct ed), sizeof (struct td));
 
index 658a2a978c32139bcf98181e9cd5fa4466f214b0..e306ca6aef3d72d0ef5958a7083bae9ea6c38033 100644 (file)
@@ -331,7 +331,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
 
        int ret = 0, irq;
 
-       dev_dbg(&pdev->dev, "%s: " DRIVER_INFO " (pnx4008)\n", hcd_name);
+       dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (pnx4008)\n", hcd_name);
        if (usb_disabled()) {
                err("USB is disabled");
                ret = -ENODEV;
index 3a7bfe7a8874c321990bb802910ea4a902671c9a..2dddb258b0db1a8261bd1b8259ecfc2ce69d284c 100644 (file)
@@ -53,7 +53,6 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v3.0"
 #define DRIVER_AUTHOR "Linus 'Frodo Rabbit' Torvalds, Johannes Erdfelt, \
 Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber, \
 Alan Stern"
@@ -951,12 +950,12 @@ static int __init uhci_hcd_init(void)
 {
        int retval = -ENOMEM;
 
-       printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION "%s\n",
-                       ignore_oc ? ", overcurrent ignored" : "");
-
        if (usb_disabled())
                return -ENODEV;
 
+       printk(KERN_INFO "uhci_hcd: " DRIVER_DESC "%s\n",
+                       ignore_oc ? ", overcurrent ignored" : "");
+
        if (DEBUG_CONFIGURED) {
                errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL);
                if (!errbuf)