[PATCH] hostap: Use ARRAY_SIZE macro when appropriate
authorAhmed S. Darwish <darwish.07@gmail.com>
Mon, 5 Feb 2007 16:58:52 +0000 (18:58 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 14 Feb 2007 20:45:04 +0000 (15:45 -0500)
A patch to use ARRAY_SIZE macro in the Host AP wireless driver.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/hostap/hostap.h

index e89c890d16fd7c0864ab964b675270f5c55b07ea..ef37a75d550b863cf4180fb4b466b00f4233b79f 100644 (file)
@@ -2,13 +2,14 @@
 #define HOSTAP_H
 
 #include <linux/ethtool.h>
+#include <linux/kernel.h>
 
 #include "hostap_wlan.h"
 #include "hostap_ap.h"
 
 static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
                                  2447, 2452, 2457, 2462, 2467, 2472, 2484 };
-#define FREQ_COUNT (sizeof(freq_list) / sizeof(freq_list[0]))
+#define FREQ_COUNT ARRAY_SIZE(freq_list)
 
 /* hostap.c */