aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2013-08-30 12:45:16 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-30 17:14:52 -0400
commitacdb9046b61a63be2e0f760e88272b370d638b35 (patch)
treeca8321b8c6ec6c43c63f30fa13eb857088095cd3
parentd6ec53e04bf7906a0fffd8f272d89ab4e04c2cd5 (diff)
staging: dwc2: add missing shift
This line extracted the available queue space without properly shifting it. Since the code only cared wether it was zero or not, it worked as expected without the shift, but adding shift makes the code cleaner. While we're here, store the result in a helper variable that was already declared to increase readability a bit more. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/dwc2/hcd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c
index f11b4f098006..9a1e062b7297 100644
--- a/drivers/staging/dwc2/hcd.c
+++ b/drivers/staging/dwc2/hcd.c
@@ -1020,7 +1020,9 @@ static void dwc2_process_periodic_channels(struct dwc2_hsotg *hsotg)
1020 qh_ptr = hsotg->periodic_sched_assigned.next; 1020 qh_ptr = hsotg->periodic_sched_assigned.next;
1021 while (qh_ptr != &hsotg->periodic_sched_assigned) { 1021 while (qh_ptr != &hsotg->periodic_sched_assigned) {
1022 tx_status = readl(hsotg->regs + HPTXSTS); 1022 tx_status = readl(hsotg->regs + HPTXSTS);
1023 if ((tx_status & TXSTS_QSPCAVAIL_MASK) == 0) { 1023 qspcavail = (tx_status & TXSTS_QSPCAVAIL_MASK) >>
1024 TXSTS_QSPCAVAIL_SHIFT;
1025 if (qspcavail == 0) {
1024 no_queue_space = 1; 1026 no_queue_space = 1;
1025 break; 1027 break;
1026 } 1028 }