summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712
diff options
context:
space:
mode:
authorShraddha Barke <shraddha.6596@gmail.com>2015-10-09 00:55:18 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-12 20:43:20 -0700
commiteef6c808d3828d55334023c13c96e1ca5cd1008b (patch)
treef1fb2439ef234ea77ccfd5e545d31532b5c6cf43 /drivers/staging/rtl8712
parent3cd66a18138ce6439ef11dca6347c6c1e180189c (diff)
downloadlinux-eef6c808d3828d55334023c13c96e1ca5cd1008b.tar.bz2
Staging: rtl8712: Use ARRAY_SIZE macro
ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its type Changes made using Coccinelle- @@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712')
-rw-r--r--drivers/staging/rtl8712/usb_intf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c
index f8b5b332e7c3..4c63baa66335 100644
--- a/drivers/staging/rtl8712/usb_intf.c
+++ b/drivers/staging/rtl8712/usb_intf.c
@@ -330,8 +330,7 @@ static void disable_ht_for_spec_devid(const struct usb_device_id *pdid,
u16 vid, pid;
u32 flags;
int i;
- int num = sizeof(specific_device_id_tbl) /
- sizeof(struct specific_device_id);
+ int num = ARRAY_SIZE(specific_device_id_tbl);
for (i = 0; i < num; i++) {
vid = specific_device_id_tbl[i].idVendor;