summaryrefslogtreecommitdiffstats
path: root/drivers/atm/nicstarmac.c
diff options
context:
space:
mode:
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 2c5e3ae..480947f 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]) );
OpenPOWER on IntegriCloud