[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <495FB1CC.5090506@gmail.com>
Date: Sat, 03 Jan 2009 19:43:24 +0100
From: Roel Kluin <roel.kluin@...il.com>
To: netdev@...r.kernel.org
CC: lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] net: fix SONIC_READ definition
drivers/net/jazzsonic.c:56:
#define SONIC_READ(reg) (*((volatile unsigned int *)dev->base_addr+reg))
drivers/net/sonic.h:53:
#define SONIC_CAP0 0x24
so drivers/net/jazzsonic.c:143:
val = SONIC_READ(SONIC_CAP0-i);
becomes
val = (*((volatile unsigned int *)dev->base_addr+0x24-i));
That is wrong, isn't it?
------------->8---------8<------------------
Fix SONIC_READ definition
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index 334ff9e..b872f23 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -53,7 +53,7 @@ static char jazz_sonic_string[] = "jazzsonic";
/*
* Macros to access SONIC registers
*/
-#define SONIC_READ(reg) (*((volatile unsigned int *)dev->base_addr+reg))
+#define SONIC_READ(reg) (*((volatile unsigned int *)dev->base_addr+(reg)))
#define SONIC_WRITE(reg,val) \
do { \
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists