diff options
author | Stoyan Gaydarov <sgayda2@uiuc.edu> | 2009-07-21 22:02:27 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:06 -0700 |
commit | b6ac161364eccce1bea4a23a9de395883e90d7ab (patch) | |
tree | 67c09dab1846a84fb0030ccfcd6f5b5a228a5eb0 /drivers/staging/rtl8192su | |
parent | 2e9ab1e72c631041f8a1c1d1fc7e5359e7e4a476 (diff) | |
download | linux-b6ac161364eccce1bea4a23a9de395883e90d7ab.tar.gz linux-b6ac161364eccce1bea4a23a9de395883e90d7ab.tar.bz2 linux-b6ac161364eccce1bea4a23a9de395883e90d7ab.zip |
Staging: ARRAY_SIZE changes
These changes were a direct result of using a semantic patch
More information can be found at http://www.emn.fr/x-info/coccinelle/
Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192su')
-rw-r--r-- | drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192su/r8192U_wx.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c index 3afd8b34f68c..145a3120c6bb 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c @@ -87,7 +87,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; diff --git a/drivers/staging/rtl8192su/r8192U_wx.c b/drivers/staging/rtl8192su/r8192U_wx.c index ad56faec596e..2208c9b1e726 100644 --- a/drivers/staging/rtl8192su/r8192U_wx.c +++ b/drivers/staging/rtl8192su/r8192U_wx.c @@ -1221,9 +1221,9 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev) struct iw_handler_def r8192_wx_handlers_def={ .standard = r8192_wx_handlers, - .num_standard = sizeof(r8192_wx_handlers) / sizeof(iw_handler), + .num_standard = ARRAY_SIZE(r8192_wx_handlers), .private = r8192_private_handler, - .num_private = sizeof(r8192_private_handler) / sizeof(iw_handler), + .num_private = ARRAY_SIZE(r8192_private_handler), .num_private_args = sizeof(r8192_private_args) / sizeof(struct iw_priv_args), .get_wireless_stats = r8192_get_wireless_stats, .private_args = (struct iw_priv_args *)r8192_private_args, |