diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-05-03 10:49:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-04 00:32:07 +0300 |
commit | 973986126a4152ab83d09263a02bf7d2d1bf3b6e (patch) | |
tree | 85b7985839de640e8807d0aa6af76906374fef36 /drivers/usb | |
parent | 88a0044e6c99a2182e46d56fb8613716b2dc8f3d (diff) | |
download | linux-973986126a4152ab83d09263a02bf7d2d1bf3b6e.tar.xz |
usb: dwc3: gadget: fix mask and shift order in DWC3_DCFG_NUMP()
In the original DWC3_DCFG_NUMP() was always zero. It looks like the
intent was to shift first and then do the mask.
Fixes: 2a58f9c12bb3 ('usb: dwc3: gadget: disable automatic calculation of ACK TP NUMP')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 186a8868829f..7ddf9449a063 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -277,7 +277,7 @@ #define DWC3_DCFG_FULLSPEED1 (3 << 0) #define DWC3_DCFG_NUMP_SHIFT 17 -#define DWC3_DCFG_NUMP(n) (((n) & 0x1f) >> DWC3_DCFG_NUMP_SHIFT) +#define DWC3_DCFG_NUMP(n) (((n) >> DWC3_DCFG_NUMP_SHIFT) & 0x1f) #define DWC3_DCFG_NUMP_MASK (0x1f << DWC3_DCFG_NUMP_SHIFT) #define DWC3_DCFG_LPM_CAP (1 << 22) |