aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-06-28 07:55:46 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 17:35:38 -0400
commite10fa4787f1fb9c8738dff955c272f30b7b63134 (patch)
tree111d4e6a46681f1c3bcbbc56606858b4291de468 /drivers/usb/host
parentf9ff70c25a7779cf6e2b0ff4aecf9c9b28eefae6 (diff)
USB: xhci: trivial: use ARRAY_SIZE
Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x). Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/xhci-mem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 2eb658d26394..6d8f7e32932a 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1588,7 +1588,7 @@ static int xhci_check_trb_in_td_math(struct xhci_hcd *xhci, gfp_t mem_flags)
1588 unsigned int num_tests; 1588 unsigned int num_tests;
1589 int i, ret; 1589 int i, ret;
1590 1590
1591 num_tests = sizeof(simple_test_vector) / sizeof(simple_test_vector[0]); 1591 num_tests = ARRAY_SIZE(simple_test_vector);
1592 for (i = 0; i < num_tests; i++) { 1592 for (i = 0; i < num_tests; i++) {
1593 ret = xhci_test_trb_in_td(xhci, 1593 ret = xhci_test_trb_in_td(xhci,
1594 xhci->event_ring->first_seg, 1594 xhci->event_ring->first_seg,
@@ -1601,7 +1601,7 @@ static int xhci_check_trb_in_td_math(struct xhci_hcd *xhci, gfp_t mem_flags)
1601 return ret; 1601 return ret;
1602 } 1602 }
1603 1603
1604 num_tests = sizeof(complex_test_vector) / sizeof(complex_test_vector[0]); 1604 num_tests = ARRAY_SIZE(complex_test_vector);
1605 for (i = 0; i < num_tests; i++) { 1605 for (i = 0; i < num_tests; i++) {
1606 ret = xhci_test_trb_in_td(xhci, 1606 ret = xhci_test_trb_in_td(xhci,
1607 complex_test_vector[i].input_seg, 1607 complex_test_vector[i].input_seg,