summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/hcd_ddma.c
diff options
context:
space:
mode:
authorJohn Youn <John.Youn@synopsys.com>2017-01-23 14:57:26 -0800
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-01-24 16:19:07 +0200
commit95832c00bc5ce3ed140f5f9b669803f75ac1431e (patch)
tree79a97499288d9768a5e27b83dcce952d248ffd5b /drivers/usb/dwc2/hcd_ddma.c
parent7de1debcd2de17c6dc2471f0f57fb0fd456d2b41 (diff)
downloadlinux-stable-95832c00bc5ce3ed140f5f9b669803f75ac1431e.tar.gz
linux-stable-95832c00bc5ce3ed140f5f9b669803f75ac1431e.tar.bz2
linux-stable-95832c00bc5ce3ed140f5f9b669803f75ac1431e.zip
usb: dwc2: Fix usage of bool params
Check these parameters only for true or false. There is no need to check for greater or less than 0. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/hcd_ddma.c')
-rw-r--r--drivers/usb/dwc2/hcd_ddma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/hcd_ddma.c b/drivers/usb/dwc2/hcd_ddma.c
index 4341f7578caa..b8bdf545c3a7 100644
--- a/drivers/usb/dwc2/hcd_ddma.c
+++ b/drivers/usb/dwc2/hcd_ddma.c
@@ -296,7 +296,7 @@ static void dwc2_release_channel_ddma(struct dwc2_hsotg *hsotg,
struct dwc2_host_chan *chan = qh->channel;
if (dwc2_qh_is_non_per(qh)) {
- if (hsotg->params.uframe_sched > 0)
+ if (hsotg->params.uframe_sched)
hsotg->available_host_channels++;
else
hsotg->non_periodic_channels--;
@@ -403,7 +403,7 @@ void dwc2_hcd_qh_free_ddma(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
if ((qh->ep_type == USB_ENDPOINT_XFER_ISOC ||
qh->ep_type == USB_ENDPOINT_XFER_INT) &&
- (hsotg->params.uframe_sched > 0 ||
+ (hsotg->params.uframe_sched ||
!hsotg->periodic_channels) && hsotg->frame_list) {
dwc2_per_sched_disable(hsotg);
dwc2_frame_list_free(hsotg);