diff mbox series

[05/13] usb: musb: Read value of PERI_RXCSR to 16bit variable

Message ID 20201129164618.5829-6-pali@kernel.org
State New
Delegated to: Marek Vasut
Headers show
Series Nokia RX-51: Fix USB TTY console and enable it | expand

Commit Message

Pali Rohár Nov. 29, 2020, 4:46 p.m. UTC
PERI_RXCSR is 16bit register so store its value into 16bit local variable.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 drivers/usb/musb/musb_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pavel Machek Nov. 29, 2020, 5:53 p.m. UTC | #1
On Sun 2020-11-29 17:46:10, Pali Rohár wrote:
> PERI_RXCSR is 16bit register so store its value into 16bit local variable.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>

Reviewed-by: Pavel Machek <pavel@ucw.cz>
diff mbox series

Patch

diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c
index d901f8777c..67d1c56f9a 100644
--- a/drivers/usb/musb/musb_udc.c
+++ b/drivers/usb/musb/musb_udc.c
@@ -629,7 +629,7 @@  static void musb_peri_ep0(void)
 static void musb_peri_rx_ep(unsigned int ep)
 {
 	u16 peri_rxcount;
-	u8 peri_rxcsr = readw(&musbr->ep[ep].epN.rxcsr);
+	u16 peri_rxcsr = readw(&musbr->ep[ep].epN.rxcsr);
 
 	if (!(peri_rxcsr & MUSB_RXCSR_RXPKTRDY)) {
 		if (debug_level > 0)