[PATCH] USB: Use ARRAY_SIZE macro

Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of ARRAY_SIZE. Some trailing whitespaces are also removed.

Patch is compile-tested on i386.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Tobias Klauser
2005-12-11 16:20:08 +01:00
committed by Greg Kroah-Hartman
parent f3d34ed48c
commit 52950ed40d
11 changed files with 24 additions and 35 deletions

View File

@@ -2353,7 +2353,7 @@ static int calc_baud_rate_divisor (int baudrate, int *divisor)
dbg("%s - %d", __FUNCTION__, baudrate);
for (i = 0; i < NUM_ENTRIES(divisor_table); i++) {
for (i = 0; i < ARRAY_SIZE(divisor_table); i++) {
if ( divisor_table[i].BaudRate == baudrate ) {
*divisor = divisor_table[i].Divisor;
return 0;