[PATCH] cs8900.c: Fix implicit integer to pointer conversion

Wolfgang Denk wd at denx.de
Tue Aug 25 11:55:16 CEST 2009


---
 drivers/net/cs8900.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index b5555fe..587f7f6 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -68,12 +68,13 @@ static u16 get_reg_init_bus(struct eth_device *dev, int regno)
 	/* force 16 bit busmode */
 	volatile u8 c;
 	struct cs8900_priv *priv = (struct cs8900_priv *)(dev->priv);
+	uint8_t volatile * const iob = (uint8_t volatile * const)dev->iobase;
 
-	c = readb(dev->iobase);
-	c = readb(dev->iobase + 1);
-	c = readb(dev->iobase);
-	c = readb(dev->iobase + 1);
-	c = readb(dev->iobase);
+	c = readb(iob);
+	c = readb(iob + 1);
+	c = readb(iob);
+	c = readb(iob + 1);
+	c = readb(iob);
 
 	REG_WRITE(regno, &priv->regs->pptr);
 	return REG_READ(&priv->regs->pdata);
-- 
1.6.0.6

With or without that:

Tested-by: Wolfgang Denk <wd at denx.de>
Acked-by: Wolfgang Denk <wd at denx.de>


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The goal of science is to build better mousetraps. The goal of nature
is to build better mice.


More information about the U-Boot mailing list