diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2005-12-11 10:20:08 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-04 16:51:43 -0500 |
commit | 52950ed40dc97456209979af1d8f51b63cf6dcab (patch) | |
tree | 527fb1a339889b3df9d227b1c17f87bc487f397f /drivers/usb/serial/safe_serial.c | |
parent | f3d34ed48c80903544b509031fee64838d29f35f (diff) |
[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>
Diffstat (limited to 'drivers/usb/serial/safe_serial.c')
-rw-r--r-- | drivers/usb/serial/safe_serial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 86dc21c728a5..f0215f850d2d 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c | |||
@@ -425,7 +425,7 @@ static int __init safe_init (void) | |||
425 | if (vendor || product) { | 425 | if (vendor || product) { |
426 | info ("vendor: %x product: %x\n", vendor, product); | 426 | info ("vendor: %x product: %x\n", vendor, product); |
427 | 427 | ||
428 | for (i = 0; i < (sizeof (id_table) / sizeof (struct usb_device_id)); i++) { | 428 | for (i = 0; i < ARRAY_SIZE(id_table); i++) { |
429 | if (!id_table[i].idVendor && !id_table[i].idProduct) { | 429 | if (!id_table[i].idVendor && !id_table[i].idProduct) { |
430 | id_table[i].idVendor = vendor; | 430 | id_table[i].idVendor = vendor; |
431 | id_table[i].idProduct = product; | 431 | id_table[i].idProduct = product; |