From: Nikitas Angelinas Date: Wed, 8 Sep 2010 21:25:42 +0000 (+0100) Subject: drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c X-Git-Tag: v2.6.37-rc1~147^2~265^2^2~139 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbce80e1101526f7a616e75a0d77b57f4062c62d;p=platform%2Fkernel%2Flinux-exynos.git drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c Replace (sizeof(ofdm_level_table)/sizeof(ofdm_level_table[0]) with ARRAY_SIZE(ofdm_level_table), and (sizeof(cck_level_table)/ sizeof(cck_level_table[0]) with ARRAY_SIZE(cck_level_table) in drivers/net/wireless/ath/ath9k/ani.c Signed-off-by: Nikitas Angelinas Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index cc648b6..0496f96 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c @@ -14,6 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include "hw.h" #include "hw-ops.h" @@ -48,7 +49,7 @@ static const struct ani_ofdm_level_entry ofdm_level_table[] = { { 7, 8, 0 } /* lvl 9 */ }; #define ATH9K_ANI_OFDM_NUM_LEVEL \ - (sizeof(ofdm_level_table)/sizeof(ofdm_level_table[0])) + ARRAY_SIZE(ofdm_level_table) #define ATH9K_ANI_OFDM_MAX_LEVEL \ (ATH9K_ANI_OFDM_NUM_LEVEL-1) #define ATH9K_ANI_OFDM_DEF_LEVEL \ @@ -94,7 +95,7 @@ static const struct ani_cck_level_entry cck_level_table[] = { }; #define ATH9K_ANI_CCK_NUM_LEVEL \ - (sizeof(cck_level_table)/sizeof(cck_level_table[0])) + ARRAY_SIZE(cck_level_table) #define ATH9K_ANI_CCK_MAX_LEVEL \ (ATH9K_ANI_CCK_NUM_LEVEL-1) #define ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI \