Staging: rtl8192e: use ARRAY_SIZE
authorKulikov Vasiliy <segooon@gmail.com>
Mon, 28 Jun 2010 11:55:28 +0000 (15:55 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Jul 2010 20:30:42 +0000 (13:30 -0700)
Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c

index 11dcec7feebb757671f14aade809ca0c036cab6f..b74491c38ec5b50570f2b8c306aa1d8b1896990a 100644 (file)
@@ -91,7 +91,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
         }
        /* Add the protocol name */
        iwe.cmd = SIOCGIWNAME;
-       for(i=0; i<(sizeof(ieee80211_modes)/sizeof(ieee80211_modes[0])); i++) {
+       for(i=0; i<ARRAY_SIZE(ieee80211_modes); i++) {
                if(network->mode&(1<<i)) {
                        sprintf(pname,ieee80211_modes[i].mode_string,ieee80211_modes[i].mode_size);
                        pname +=ieee80211_modes[i].mode_size;