diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2010-11-30 18:55:51 -0500 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-03-13 21:07:07 -0400 |
commit | da13051cc756756f10b2da8ea97b05bdf84bd7bb (patch) | |
tree | d4036bb80a731da1eeaa57211afe37f3fc000056 /drivers/usb/host/ohci-hub.c | |
parent | 0b8ca72a23df365a413e03f991bc6b8179dee13f (diff) |
USB: Remove bitmap #define from hcd.h
Using a #define to redefine a common variable name is a bad thing,
especially when the #define is in a header. include/linux/usb/hcd.h
redefined bitmap to DeviceRemovable to avoid typing a long field in the
hub descriptor. This has unintended side effects for files like
drivers/usb/core/devio.c that include that file, since another header
included after hcd.h has different variables named bitmap.
Remove the bitmap #define and replace instances of it in the host
controller code. Cleanup the spaces around function calls and square
brackets while we're at it.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Cc: Tony Olech <tony.olech@elandigitalsystems.com>
Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Max Vozeler <mvz@vozeler.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Rodolfo Giometti <giometti@linux.it>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Anton Vorontsov <avorontsov@mvista.com>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Lothar Wassmann <LW@KARO-electronics.de>
Cc: Olav Kongas <ok@artecdesign.ee>
Cc: Martin Fuzzey <mfuzzey@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'drivers/usb/host/ohci-hub.c')
-rw-r--r-- | drivers/usb/host/ohci-hub.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index cddcda95b579..cd4b74f27d06 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c | |||
@@ -580,15 +580,15 @@ ohci_hub_descriptor ( | |||
580 | temp |= 0x0008; | 580 | temp |= 0x0008; |
581 | desc->wHubCharacteristics = (__force __u16)cpu_to_hc16(ohci, temp); | 581 | desc->wHubCharacteristics = (__force __u16)cpu_to_hc16(ohci, temp); |
582 | 582 | ||
583 | /* two bitmaps: ports removable, and usb 1.0 legacy PortPwrCtrlMask */ | 583 | /* ports removable, and usb 1.0 legacy PortPwrCtrlMask */ |
584 | rh = roothub_b (ohci); | 584 | rh = roothub_b (ohci); |
585 | memset(desc->bitmap, 0xff, sizeof(desc->bitmap)); | 585 | memset(desc->DeviceRemovable, 0xff, sizeof(desc->DeviceRemovable)); |
586 | desc->bitmap [0] = rh & RH_B_DR; | 586 | desc->DeviceRemovable[0] = rh & RH_B_DR; |
587 | if (ohci->num_ports > 7) { | 587 | if (ohci->num_ports > 7) { |
588 | desc->bitmap [1] = (rh & RH_B_DR) >> 8; | 588 | desc->DeviceRemovable[1] = (rh & RH_B_DR) >> 8; |
589 | desc->bitmap [2] = 0xff; | 589 | desc->DeviceRemovable[2] = 0xff; |
590 | } else | 590 | } else |
591 | desc->bitmap [1] = 0xff; | 591 | desc->DeviceRemovable[1] = 0xff; |
592 | } | 592 | } |
593 | 593 | ||
594 | /*-------------------------------------------------------------------------*/ | 594 | /*-------------------------------------------------------------------------*/ |