summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/safe_serial.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2005-12-11 18:20:08 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-05 00:51:43 +0300
commit52950ed40dc97456209979af1d8f51b63cf6dcab (patch)
tree527fb1a339889b3df9d227b1c17f87bc487f397f /drivers/usb/serial/safe_serial.c
parentf3d34ed48c80903544b509031fee64838d29f35f (diff)
downloadlinux-52950ed40dc97456209979af1d8f51b63cf6dcab.tar.xz
[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.c2
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)
if (vendor || product) {
info ("vendor: %x product: %x\n", vendor, product);
- for (i = 0; i < (sizeof (id_table) / sizeof (struct usb_device_id)); i++) {
+ for (i = 0; i < ARRAY_SIZE(id_table); i++) {
if (!id_table[i].idVendor && !id_table[i].idProduct) {
id_table[i].idVendor = vendor;
id_table[i].idProduct = product;