diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2020-07-01 20:24:51 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-07-24 15:45:15 +0200 |
commit | ca14378560db5440893404a639d69846f46eb70e (patch) | |
tree | 15990f4c10aba27cb32aabfd4e889731a8f6a6dc /drivers/usb/dwc3/gadget.c | |
parent | usb: gadget: function: printer: Interface is disabled and returns error (diff) | |
download | linux-ca14378560db5440893404a639d69846f46eb70e.tar.xz linux-ca14378560db5440893404a639d69846f46eb70e.zip |
usb: dwc3: gadget: add frame number mask
This patch adds a define DWC3_FRNUMBER_MASK for the commonly used
0x3fff mask and uses it.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 3ab6f118c508..ca27907667a3 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1403,7 +1403,7 @@ static int dwc3_gadget_start_isoc_quirk(struct dwc3_ep *dep) * Check if we can start isoc transfer on the next interval or * 4 uframes in the future with BIT[15:14] as dep->combo_num */ - test_frame_number = dep->frame_number & 0x3fff; + test_frame_number = dep->frame_number & DWC3_FRNUMBER_MASK; test_frame_number |= dep->combo_num << 14; test_frame_number += max_t(u32, 4, dep->interval); @@ -1450,7 +1450,7 @@ static int dwc3_gadget_start_isoc_quirk(struct dwc3_ep *dep) else if (test0 && test1) dep->combo_num = 0; - dep->frame_number &= 0x3fff; + dep->frame_number &= DWC3_FRNUMBER_MASK; dep->frame_number |= dep->combo_num << 14; dep->frame_number += max_t(u32, 4, dep->interval); |