Commit 66ffc875 authored by Stephen Warren's avatar Stephen Warren Committed by Marek Vasut
Browse files

usb: dwc2: simplify wait_for_chhltd

toggle is never NULL. Simplify the code by removing handling of when it
is NULL.
Signed-off-by: default avatarStephen Warren <>
parent 282685e0
......@@ -724,11 +724,9 @@ int wait_for_chhltd(uint32_t *sub, int *toggle)
hctsiz = readl(&hc_regs->hctsiz);
*sub = (hctsiz & DWC2_HCTSIZ_XFERSIZE_MASK) >>
if (toggle)
*toggle = (hctsiz & DWC2_HCTSIZ_PID_MASK) >>
*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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment