aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm/nicstarmac.c
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2007-02-16 04:42:23 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-17 15:30:48 -0500
commit36fe55d6a3c7096a7dc852010865c63d572aeaf4 (patch)
tree5fbd732b547c94f930ec9347c530b74b066b35c9 /drivers/atm/nicstarmac.c
parent52edc17f94f7bd4d9a66bb13d9142f4072c7a82d (diff)
atm: Use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in kernel.h for ATM drivers. Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: chas williams <chas@cmf.nrl.navy.mil> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/atm/nicstarmac.c')
-rw-r--r--drivers/atm/nicstarmac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/atm/nicstarmac.c b/drivers/atm/nicstarmac.c
index 2c5e3ae77503..480947f4e01e 100644
--- a/drivers/atm/nicstarmac.c
+++ b/drivers/atm/nicstarmac.c
@@ -7,6 +7,8 @@
7 * Read this ForeRunner's MAC address from eprom/eeprom 7 * Read this ForeRunner's MAC address from eprom/eeprom
8 */ 8 */
9 9
10#include <linux/kernel.h>
11
10typedef void __iomem *virt_addr_t; 12typedef void __iomem *virt_addr_t;
11 13
12#define CYCLE_DELAY 5 14#define CYCLE_DELAY 5
@@ -176,7 +178,7 @@ read_eprom_byte(virt_addr_t base, u_int8_t offset)
176 val = NICSTAR_REG_READ( base, NICSTAR_REG_GENERAL_PURPOSE ) & 0xFFFFFFF0; 178 val = NICSTAR_REG_READ( base, NICSTAR_REG_GENERAL_PURPOSE ) & 0xFFFFFFF0;
177 179
178 /* Send READ instruction */ 180 /* Send READ instruction */
179 for (i=0; i<sizeof readtab/sizeof readtab[0]; i++) 181 for (i=0; i<ARRAY_SIZE(readtab); i++)
180 { 182 {
181 NICSTAR_REG_WRITE( base, NICSTAR_REG_GENERAL_PURPOSE, 183 NICSTAR_REG_WRITE( base, NICSTAR_REG_GENERAL_PURPOSE,
182 (val | readtab[i]) ); 184 (val | readtab[i]) );