diff options
author | Ahmed S. Darwish <darwish.07@gmail.com> | 2007-02-16 10:42:23 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-17 21:30:48 +0100 |
commit | 36fe55d6a3c7096a7dc852010865c63d572aeaf4 (patch) | |
tree | 5fbd732b547c94f930ec9347c530b74b066b35c9 /drivers/atm/nicstarmac.c | |
parent | bugfixes and new hardware support for arcnet driver (diff) | |
download | linux-36fe55d6a3c7096a7dc852010865c63d572aeaf4.tar.xz linux-36fe55d6a3c7096a7dc852010865c63d572aeaf4.zip |
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]) ); |