aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2012-08-12 05:16:32 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-14 17:45:06 -0400
commit5ea429638fbd9f18e6837e3e83a1f517741ec43b (patch)
tree7096e64e5b6c7002d239a9070993b5ea5b478c9d
parent9b469a60d68b13c288d5c3fc23de29d9d482dbe6 (diff)
net: qmi_wwan: compress device_id list using macros
Take advantage of the matching macros to make the device id list easier to read and maintain. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/usb/qmi_wwan.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 24524b24329b..aaa061b7355d 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -356,38 +356,21 @@ static const struct driver_info qmi_wwan_shared = {
356static const struct usb_device_id products[] = { 356static const struct usb_device_id products[] = {
357 /* 1. CDC ECM like devices match on the control interface */ 357 /* 1. CDC ECM like devices match on the control interface */
358 { /* Huawei E392, E398 and possibly others sharing both device id and more... */ 358 { /* Huawei E392, E398 and possibly others sharing both device id and more... */
359 .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, 359 USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 1, 9),
360 .idVendor = HUAWEI_VENDOR_ID,
361 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
362 .bInterfaceSubClass = 1,
363 .bInterfaceProtocol = 9, /* CDC Ethernet *control* interface */
364 .driver_info = (unsigned long)&qmi_wwan_info, 360 .driver_info = (unsigned long)&qmi_wwan_info,
365 }, 361 },
366 { /* Vodafone/Huawei K5005 (12d1:14c8) and similar modems */ 362 { /* Vodafone/Huawei K5005 (12d1:14c8) and similar modems */
367 .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, 363 USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 1, 57),
368 .idVendor = HUAWEI_VENDOR_ID,
369 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
370 .bInterfaceSubClass = 1,
371 .bInterfaceProtocol = 57, /* CDC Ethernet *control* interface */
372 .driver_info = (unsigned long)&qmi_wwan_info, 364 .driver_info = (unsigned long)&qmi_wwan_info,
373 }, 365 },
374 366
375 /* 2. Combined interface devices matching on class+protocol */ 367 /* 2. Combined interface devices matching on class+protocol */
376 { /* Huawei E392, E398 and possibly others in "Windows mode" */ 368 { /* Huawei E392, E398 and possibly others in "Windows mode" */
377 .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, 369 USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 1, 17),
378 .idVendor = HUAWEI_VENDOR_ID,
379 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
380 .bInterfaceSubClass = 1,
381 .bInterfaceProtocol = 17,
382 .driver_info = (unsigned long)&qmi_wwan_shared, 370 .driver_info = (unsigned long)&qmi_wwan_shared,
383 }, 371 },
384 { /* Pantech UML290 */ 372 { /* Pantech UML290 */
385 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, 373 USB_DEVICE_AND_INTERFACE_INFO(0x106c, 0x3718, USB_CLASS_VENDOR_SPEC, 0xf0, 0xff),
386 .idVendor = 0x106c,
387 .idProduct = 0x3718,
388 .bInterfaceClass = 0xff,
389 .bInterfaceSubClass = 0xf0,
390 .bInterfaceProtocol = 0xff,
391 .driver_info = (unsigned long)&qmi_wwan_shared, 374 .driver_info = (unsigned long)&qmi_wwan_shared,
392 }, 375 },
393 376