summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStephen Warren <swarren@wwwdotorg.org>2015-03-07 22:48:55 -0700
committerMarek Vasut <marex@denx.de>2015-04-14 05:47:58 +0200
commit66ffc87586e04d09f259bbca74f05b156d4cc96f (patch)
tree69db99e383d818a9a39c5832a6d54f30f61c0755 /drivers
parent282685e07e4f5dccc70c6bfd3ce3603861e94aaa (diff)
downloadu-boot-imx-66ffc87586e04d09f259bbca74f05b156d4cc96f.zip
u-boot-imx-66ffc87586e04d09f259bbca74f05b156d4cc96f.tar.gz
u-boot-imx-66ffc87586e04d09f259bbca74f05b156d4cc96f.tar.bz2
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/dwc2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index e8a7e71..5a1c44a 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -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;
}