Commit 5312af9e authored by Quytelda Kahja's avatar Quytelda Kahja Committed by Greg Kroah-Hartman

staging: ks7010: Use the ARRAY_SIZE() macro to calculate array sizes.

This macro, provided in 'linux/kernel.h', will calculate the size
more succinctly than a division operation.
Signed-off-by: default avatarQuytelda Kahja <quytelda@tamalin.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b1e04ba0
...@@ -2702,10 +2702,9 @@ static const iw_handler ks_wlan_private_handler[] = { ...@@ -2702,10 +2702,9 @@ static const iw_handler ks_wlan_private_handler[] = {
}; };
static const struct iw_handler_def ks_wlan_handler_def = { static const struct iw_handler_def ks_wlan_handler_def = {
.num_standard = sizeof(ks_wlan_handler) / sizeof(iw_handler), .num_standard = ARRAY_SIZE(ks_wlan_handler),
.num_private = sizeof(ks_wlan_private_handler) / sizeof(iw_handler), .num_private = ARRAY_SIZE(ks_wlan_private_handler),
.num_private_args = .num_private_args = ARRAY_SIZE(ks_wlan_private_args),
sizeof(ks_wlan_private_args) / sizeof(struct iw_priv_args),
.standard = (iw_handler *)ks_wlan_handler, .standard = (iw_handler *)ks_wlan_handler,
.private = (iw_handler *)ks_wlan_private_handler, .private = (iw_handler *)ks_wlan_private_handler,
.private_args = (struct iw_priv_args *)ks_wlan_private_args, .private_args = (struct iw_priv_args *)ks_wlan_private_args,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment