lkml.org 
[lkml]   [2018]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] staging: emxx_udc: Added a temporary variable with address.
Date
Replace the IO_ADDRESS call with a temporary variable.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
---
drivers/staging/emxx_udc/emxx_udc.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index ebc622f..d55cadd 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -108,20 +108,22 @@ static void _nbu2ss_dump_register(struct nbu2ss_udc *udc)

dev_dbg(&udc->dev, "\n-USB REG-\n");
for (i = 0x0 ; i < USB_BASE_SIZE ; i += 16) {
- reg_data = _nbu2ss_readl(
- (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i));
+ u32 *tmp;
+
+ tmp = (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i);
+ reg_data = _nbu2ss_readl(tmp);
dev_dbg(&udc->dev, "USB%04x =%08x", i, (int)reg_data);

- reg_data = _nbu2ss_readl(
- (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 4));
+ tmp = (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 4);
+ reg_data = _nbu2ss_readl(tmp);
dev_dbg(&udc->dev, " %08x", (int)reg_data);

- reg_data = _nbu2ss_readl(
- (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 8));
+ tmp = (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 8);
+ reg_data = _nbu2ss_readl(tmp);
dev_dbg(&udc->dev, " %08x", (int)reg_data);

- reg_data = _nbu2ss_readl(
- (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 12));
+ tmp = (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 12);
+ reg_data = _nbu2ss_readl(tmp);
dev_dbg(&udc->dev, " %08x\n", (int)reg_data);
}

--
2.7.4
\
 
 \ /
  Last update: 2018-11-27 00:20    [W:0.087 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site