diff options
author | Dan Carpenter <error27@gmail.com> | 2011-03-17 22:39:49 +0300 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-04-13 16:19:47 -0700 |
commit | 22e0487047567252d5677ff35766cd884375efc2 (patch) | |
tree | 792d135afe30d6af87d38ff5a8eb010d39c86053 /drivers/usb/host/xhci.h | |
parent | 5a6c2f3ff039154872ce597952f8b8900ea0d732 (diff) | |
download | blackbird-op-linux-22e0487047567252d5677ff35766cd884375efc2.tar.gz blackbird-op-linux-22e0487047567252d5677ff35766cd884375efc2.zip |
USB: xhci: unsigned char never equals -1
There were some places that compared port_speed == -1 where port_speed
is a u8. This doesn't work unless we cast the -1 to u8. Some places
did it correctly.
Instead of using -1 directly, I've created a DUPLICATE_ENTRY define
which does the cast and is more descriptive as well.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r-- | drivers/usb/host/xhci.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 91b1a237c11e..bdb78f51735e 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -348,6 +348,9 @@ struct xhci_op_regs { /* Initiate a warm port reset - complete when PORT_WRC is '1' */ #define PORT_WR (1 << 31) +/* We mark duplicate entries with -1 */ +#define DUPLICATE_ENTRY ((u8)(-1)) + /* Port Power Management Status and Control - port_power_base bitmasks */ /* Inactivity timer value for transitions into U1, in microseconds. * Timeout can be up to 127us. 0xFF means an infinite timeout. |