For some reason, the value of the HPTXFSIZ register was built in the
ptxfsiz variable, while there was also a hptxfsiz variable availble.
Better just use that.

Signed-off-by: Matthijs Kooijman <matth...@stdin.nl>
---
 drivers/staging/dwc2/core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index 4068dd5..07f91e6 100644
--- a/drivers/staging/dwc2/core.c
+++ b/drivers/staging/dwc2/core.c
@@ -499,7 +499,7 @@ void dwc2_disable_host_interrupts(struct dwc2_hsotg *hsotg)
 static void dwc2_config_fifos(struct dwc2_hsotg *hsotg)
 {
        struct dwc2_core_params *params = hsotg->core_params;
-       u32 rxfsiz, nptxfsiz, ptxfsiz, hptxfsiz, dfifocfg;
+       u32 rxfsiz, nptxfsiz, hptxfsiz, dfifocfg;
 
        if (!params->enable_dynamic_fifo)
                return;
@@ -531,12 +531,12 @@ static void dwc2_config_fifos(struct dwc2_hsotg *hsotg)
        /* Periodic Tx FIFO */
        dev_dbg(hsotg->dev, "initial hptxfsiz=%08x\n",
                readl(hsotg->regs + HPTXFSIZ));
-       ptxfsiz = params->host_perio_tx_fifo_size <<
-                 HPTXFSIZ_P_TXF_DEP_SHIFT & HPTXFSIZ_P_TXF_DEP_MASK;
-       ptxfsiz |= (params->host_rx_fifo_size +
+       hptxfsiz = params->host_perio_tx_fifo_size <<
+                  HPTXFSIZ_P_TXF_DEP_SHIFT & HPTXFSIZ_P_TXF_DEP_MASK;
+       hptxfsiz |= (params->host_rx_fifo_size +
                    params->host_nperio_tx_fifo_size) <<
-                  HPTXFSIZ_P_TXF_ST_ADDR_SHIFT & HPTXFSIZ_P_TXF_ST_ADDR_MASK;
-       writel(ptxfsiz, hsotg->regs + HPTXFSIZ);
+                   HPTXFSIZ_P_TXF_ST_ADDR_SHIFT & HPTXFSIZ_P_TXF_ST_ADDR_MASK;
+       writel(hptxfsiz, hsotg->regs + HPTXFSIZ);
        dev_dbg(hsotg->dev, "new hptxfsiz=%08x\n",
                readl(hsotg->regs + HPTXFSIZ));
 
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to