diff options
author | Ahmed S. Darwish | 2007-02-16 01:42:23 -0800 |
---|---|---|
committer | Jeff Garzik | 2007-02-17 15:30:48 -0500 |
commit | 36fe55d6a3c7096a7dc852010865c63d572aeaf4 (patch) | |
tree | 5fbd732b547c94f930ec9347c530b74b066b35c9 /drivers/atm/nicstarmac.c | |
parent | 52edc17f94f7bd4d9a66bb13d9142f4072c7a82d (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.c | 4 |
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 @@ * Read this ForeRunner's MAC address from eprom/eeprom */ +#include <linux/kernel.h> + typedef void __iomem *virt_addr_t; #define CYCLE_DELAY 5 @@ -176,7 +178,7 @@ read_eprom_byte(virt_addr_t base, u_int8_t offset) val = NICSTAR_REG_READ( base, NICSTAR_REG_GENERAL_PURPOSE ) & 0xFFFFFFF0; /* Send READ instruction */ - for (i=0; i<sizeof readtab/sizeof readtab[0]; i++) + for (i=0; i<ARRAY_SIZE(readtab); i++) { NICSTAR_REG_WRITE( base, NICSTAR_REG_GENERAL_PURPOSE, (val | readtab[i]) ); |