mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-25 21:54:23 +01:00
usb: dwc2: simplify wait_for_chhltd
toggle is never NULL. Simplify the code by removing handling of when it is NULL. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
This commit is contained in:
parent
282685e07e
commit
66ffc87586
1 changed files with 2 additions and 4 deletions
|
|
@ -724,11 +724,9 @@ int wait_for_chhltd(uint32_t *sub, int *toggle)
|
|||
hctsiz = readl(&hc_regs->hctsiz);
|
||||
*sub = (hctsiz & DWC2_HCTSIZ_XFERSIZE_MASK) >>
|
||||
DWC2_HCTSIZ_XFERSIZE_OFFSET;
|
||||
if (toggle)
|
||||
*toggle = (hctsiz & DWC2_HCTSIZ_PID_MASK) >>
|
||||
DWC2_HCTSIZ_PID_OFFSET;
|
||||
*toggle = (hctsiz & DWC2_HCTSIZ_PID_MASK) >> DWC2_HCTSIZ_PID_OFFSET;
|
||||
|
||||
debug("%s: sub=%u toggle=%d\n", __func__, *sub, toggle ? *toggle : -1);
|
||||
debug("%s: sub=%u toggle=%d\n", __func__, *sub, *toggle);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue