aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/de4x5.c
diff options
context:
space:
mode:
authorAlejandro Martinez Ruiz <alex@flawedcode.org>2007-10-14 21:37:43 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-15 15:57:38 -0400
commite9edda697ed7697f1288d0656570e49c47e204ae (patch)
tree6d43d602b7e0eb98940a516e0e0d2c8fd1a7006a /drivers/net/tulip/de4x5.c
parent88a15f2e28bd6a908b2925f1b76e70ef3a88297d (diff)
netdev: convert non-obvious instances to use ARRAY_SIZE()
This will convert remaining non-obvious or naive calculations of array sizes to use ARRAY_SIZE() macro. Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/tulip/de4x5.c')
-rw-r--r--drivers/net/tulip/de4x5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index 9b9cd83fb8b6..41f34bb91cad 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -1041,7 +1041,7 @@ static struct InfoLeaf infoleaf_array[] = {
1041 {DC21142, dc21142_infoleaf}, 1041 {DC21142, dc21142_infoleaf},
1042 {DC21143, dc21143_infoleaf} 1042 {DC21143, dc21143_infoleaf}
1043}; 1043};
1044#define INFOLEAF_SIZE (sizeof(infoleaf_array)/(sizeof(int)+sizeof(int *))) 1044#define INFOLEAF_SIZE ARRAY_SIZE(infoleaf_array)
1045 1045
1046/* 1046/*
1047** List the SROM info block functions 1047** List the SROM info block functions
@@ -1056,7 +1056,7 @@ static int (*dc_infoblock[])(struct net_device *dev, u_char, u_char *) = {
1056 compact_infoblock 1056 compact_infoblock
1057}; 1057};
1058 1058
1059#define COMPACT (sizeof(dc_infoblock)/sizeof(int *) - 1) 1059#define COMPACT (ARRAY_SIZE(dc_infoblock) - 1)
1060 1060
1061/* 1061/*
1062** Miscellaneous defines... 1062** Miscellaneous defines...