[5/15] orinoco merge preliminaries - use ARRAY_SIZE()

David Gibson
2004-07-28T07:13:48Z

Use the built in ARRAY_SIZE macro, instead of hard coding it
ourselves.

Signed-off-by: David Gibson <hermes@gibson.dropbear.id.au>

Index: working-2.6/drivers/net/wireless/orinoco.c
===================================================================
--- working-2.6.orig/drivers/net/wireless/orinoco.c 2004-07-28 14:33:14.111384944 +1000
+++ working-2.6/drivers/net/wireless/orinoco.c 2004-07-28 14:33:17.540863584 +1000
@@ -507,7 +507,7 @@
2412, 2417, 2422, 2427, 2432, 2437, 2442,
2447, 2452, 2457, 2462, 2467, 2472, 2484
};
-#define NUM_CHANNELS ( sizeof(channel_frequency) / sizeof(channel_frequency[0]) )
+#define NUM_CHANNELS ARRAY_SIZE(channel_frequency)

/* This tables gives the actual meanings of the bitrate IDs returned by the firmware. */
struct {
@@ -525,7 +525,7 @@
{55, 1, 7, 7},
{110, 0, 5, 8},
};
-#define BITRATE_TABLE_SIZE (sizeof(bitrate_table) / sizeof(bitrate_table[0]))
+#define BITRATE_TABLE_SIZE ARRAY_SIZE(bitrate_table)

/********************************************************************/
/* Data types */