Skip to content

Commit

Permalink
USB: EHCI, OHCI, UHCI: remove version numbers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Oct 17, 2008
1 parent 1987625 commit 2b70f07
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 19 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/host/ehci-dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
13 changes: 7 additions & 6 deletions drivers/usb/host/ehci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/host/ohci-dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 2 additions & 5 deletions drivers/usb/host/ohci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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));

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/host/ohci-pnx4008.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions drivers/usb/host/uhci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2b70f07

Please sign in to comment.