summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/acm.c11
-rw-r--r--drivers/usb/audio.c3
-rw-r--r--drivers/usb/bluetooth.c8
-rw-r--r--drivers/usb/dabusb.c6
-rw-r--r--drivers/usb/dc2xx.c25
-rw-r--r--drivers/usb/dsbr100.c4
-rw-r--r--drivers/usb/hid.c3
-rw-r--r--drivers/usb/hub.c3
-rw-r--r--drivers/usb/ibmcam.c16
-rw-r--r--drivers/usb/mdc800.c4
-rw-r--r--drivers/usb/microtek.c18
-rw-r--r--drivers/usb/net1080.c8
-rw-r--r--drivers/usb/ov511.c10
-rw-r--r--drivers/usb/pegasus.c3
-rw-r--r--drivers/usb/printer.c8
-rw-r--r--drivers/usb/rio500.c4
-rw-r--r--drivers/usb/scanner.c113
-rw-r--r--drivers/usb/serial/belkin_sa.c12
-rw-r--r--drivers/usb/serial/digi_acceleport.c14
-rw-r--r--drivers/usb/serial/empeg.c2
-rw-r--r--drivers/usb/serial/ftdi_sio.c14
-rw-r--r--drivers/usb/serial/keyspan.h74
-rw-r--r--drivers/usb/serial/keyspan_pda.c14
-rw-r--r--drivers/usb/serial/omninet.c4
-rw-r--r--drivers/usb/serial/visor.c2
-rw-r--r--drivers/usb/serial/whiteheat.c14
-rw-r--r--drivers/usb/storage/debug.h4
-rw-r--r--drivers/usb/usb.c35
-rw-r--r--drivers/usb/usbkbd.c4
-rw-r--r--drivers/usb/usbmouse.c2
-rw-r--r--drivers/usb/uss720.c8
-rw-r--r--drivers/usb/wacom.c12
32 files changed, 220 insertions, 242 deletions
diff --git a/drivers/usb/acm.c b/drivers/usb/acm.c
index 881129966..555a7e967 100644
--- a/drivers/usb/acm.c
+++ b/drivers/usb/acm.c
@@ -489,15 +489,6 @@ static void *acm_probe(struct usb_device *dev, unsigned int ifnum,
int readsize, ctrlsize, minor, i;
unsigned char *buf;
-/*
- * Since 0 is treated as a wildcard by the USB pattern matching,
- * we explicitly check bDeviceSubClass and bDeviceProtocol here.
- */
-
- if (dev->descriptor.bDeviceSubClass != 0 ||
- dev->descriptor.bDeviceProtocol != 0)
- return NULL;
-
for (i = 0; i < dev->descriptor.bNumConfigurations; i++) {
cfacm = dev->config + i;
@@ -632,7 +623,7 @@ static void acm_disconnect(struct usb_device *dev, void *ptr)
*/
static struct usb_device_id acm_ids[] = {
- { bDeviceClass: 2, bDeviceSubClass: 0, bDeviceProtocol: 0},
+ { USB_DEVICE_INFO(2, 0, 0) },
{ }
};
diff --git a/drivers/usb/audio.c b/drivers/usb/audio.c
index 81b3707ef..fb4939d92 100644
--- a/drivers/usb/audio.c
+++ b/drivers/usb/audio.c
@@ -2698,7 +2698,8 @@ static void * usb_audio_probe(struct usb_device *dev, unsigned int ifnum,
static void usb_audio_disconnect(struct usb_device *dev, void *ptr);
static struct usb_device_id usb_audio_ids [] = {
- { bInterfaceClass: USB_CLASS_AUDIO, bInterfaceSubClass: 1},
+ { match_flags: (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS),
+ bInterfaceClass: USB_CLASS_AUDIO, bInterfaceSubClass: 1},
{ } /* Terminating entry */
};
diff --git a/drivers/usb/bluetooth.c b/drivers/usb/bluetooth.c
index 616058acc..41a3c857e 100644
--- a/drivers/usb/bluetooth.c
+++ b/drivers/usb/bluetooth.c
@@ -193,12 +193,8 @@ static void usb_bluetooth_disconnect (struct usb_device *dev, void *ptr);
static struct usb_device_id usb_bluetooth_ids [] = {
- {
- bDeviceClass: WIRELESS_CLASS_CODE,
- bDeviceSubClass: RF_SUBCLASS_CODE,
- bDeviceProtocol: BLUETOOTH_PROGRAMMING_PROTOCOL_CODE
- },
- { } /* Terminating entry */
+ { USB_DEVICE_INFO(WIRELESS_CLASS_CODE, RF_SUBCLASS_CODE, BLUETOOTH_PROGRAMMING_PROTOCOL_CODE) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, usb_bluetooth_ids);
diff --git a/drivers/usb/dabusb.c b/drivers/usb/dabusb.c
index 154ed17cb..989937e86 100644
--- a/drivers/usb/dabusb.c
+++ b/drivers/usb/dabusb.c
@@ -787,9 +787,9 @@ static void dabusb_disconnect (struct usb_device *usbdev, void *ptr)
}
static struct usb_device_id dabusb_ids [] = {
- { idVendor: 0x0547, idProduct: 0x2131 },
- { idVendor: 0x0547, idProduct: 0x9999 },
- { } /* Terminating entry */
+ { USB_DEVICE(0x0547, 0x2131) },
+ { USB_DEVICE(0x0547, 0x9999) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, dabusb_ids);
diff --git a/drivers/usb/dc2xx.c b/drivers/usb/dc2xx.c
index 5503e6e66..58d6b2843 100644
--- a/drivers/usb/dc2xx.c
+++ b/drivers/usb/dc2xx.c
@@ -91,29 +91,28 @@
/* table of cameras that work through this driver */
static struct usb_device_id camera_table [] = {
-
/* These have the same application level protocol */
- { idVendor: 0x040a, idProduct: 0x0120 }, // Kodak DC-240
- { idVendor: 0x040a, idProduct: 0x0130 }, // Kodak DC-280
- { idVendor: 0x040a, idProduct: 0x0131 }, // Kodak DC-5000
- { idVendor: 0x040a, idProduct: 0x0132 }, // Kodak DC-3400
+ { USB_DEVICE(0x040a, 0x0120) }, // Kodak DC-240
+ { USB_DEVICE(0x040a, 0x0130) }, // Kodak DC-280
+ { USB_DEVICE(0x040a, 0x0131) }, // Kodak DC-5000
+ { USB_DEVICE(0x040a, 0x0132) }, // Kodak DC-3400
/* These have a different application level protocol which
* is part of the Flashpoint "DigitaOS". That supports some
* non-camera devices, and some non-Kodak cameras.
*/
- { idVendor: 0x040a, idProduct: 0x0100 }, // Kodak DC-220
- { idVendor: 0x040a, idProduct: 0x0110 }, // Kodak DC-260
- { idVendor: 0x040a, idProduct: 0x0111 }, // Kodak DC-265
- { idVendor: 0x040a, idProduct: 0x0112 }, // Kodak DC-290
- { idVendor: 0xf003, idProduct: 0x6002 }, // HP PhotoSmart C500
+ { USB_DEVICE(0x040a, 0x0100) }, // Kodak DC-220
+ { USB_DEVICE(0x040a, 0x0110) }, // Kodak DC-260
+ { USB_DEVICE(0x040a, 0x0111) }, // Kodak DC-265
+ { USB_DEVICE(0x040a, 0x0112) }, // Kodak DC-290
+ { USB_DEVICE(0xf003, 0x6002) }, // HP PhotoSmart C500
/* Other USB devices may well work here too, so long as they
* just stick to half duplex bulk packet exchanges. That
* means, among other things, no iso or interrupt endpoints.
*/
- { } /* Terminating entry */
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, camera_table);
@@ -353,7 +352,7 @@ static /* const */ struct file_operations usb_camera_fops = {
-static void * __devinit
+static void *
camera_probe (struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *camera_info)
{
int i;
@@ -451,7 +450,7 @@ bye:
return camera;
}
-static void __devexit camera_disconnect(struct usb_device *dev, void *ptr)
+static void camera_disconnect(struct usb_device *dev, void *ptr)
{
struct camera_state *camera = (struct camera_state *) ptr;
int subminor = camera->subminor;
diff --git a/drivers/usb/dsbr100.c b/drivers/usb/dsbr100.c
index a59759bb9..32e61ce7d 100644
--- a/drivers/usb/dsbr100.c
+++ b/drivers/usb/dsbr100.c
@@ -102,8 +102,8 @@ static struct video_device usb_dsbr100_radio=
static int users = 0;
static struct usb_device_id usb_dsbr100_table [] = {
- { idVendor: DSB100_VENDOR, idProduct: DSB100_PRODUCT },
- { } /* Terminating entry */
+ { USB_DEVICE(DSB100_VENDOR, DSB100_PRODUCT) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, usb_dsbr100_table);
diff --git a/drivers/usb/hid.c b/drivers/usb/hid.c
index f3901d24a..208be6775 100644
--- a/drivers/usb/hid.c
+++ b/drivers/usb/hid.c
@@ -1529,7 +1529,8 @@ static void hid_disconnect(struct usb_device *dev, void *ptr)
}
static struct usb_device_id hid_usb_ids [] = {
- { bInterfaceClass: USB_INTERFACE_CLASS_HID},
+ { match_flags: USB_DEVICE_ID_MATCH_INT_CLASS,
+ bInterfaceClass: USB_INTERFACE_CLASS_HID},
{ } /* Terminating entry */
};
diff --git a/drivers/usb/hub.c b/drivers/usb/hub.c
index 8ecc1221b..0306cf2ea 100644
--- a/drivers/usb/hub.c
+++ b/drivers/usb/hub.c
@@ -765,7 +765,8 @@ static int usb_hub_thread(void *__hub)
}
static struct usb_device_id hub_id_table [] = {
- { bInterfaceClass: USB_CLASS_HUB},
+ { match_flags: USB_DEVICE_ID_MATCH_INT_CLASS,
+ bInterfaceClass: USB_CLASS_HUB},
{ } /* Terminating entry */
};
diff --git a/drivers/usb/ibmcam.c b/drivers/usb/ibmcam.c
index a502cbaf1..ca1c32cd9 100644
--- a/drivers/usb/ibmcam.c
+++ b/drivers/usb/ibmcam.c
@@ -3110,19 +3110,9 @@ static void usb_ibmcam_disconnect(struct usb_device *dev, void *ptr)
}
static struct usb_device_id ibmcam_table [] = {
- {
- idVendor: 0x0545,
- idProduct: 0x8080,
- bcdDevice_lo: 0x0002,
- bcdDevice_hi: 0x0002
- },
- {
- idVendor: 0x0545,
- idProduct: 0x8080,
- bcdDevice_lo: 0X030a,
- bcdDevice_hi: 0x030a
- },
- { } /* Terminating entry */
+ { USB_DEVICE_VER(0x0545, 0x8080, 0x0002, 0x0002) },
+ { USB_DEVICE_VER(0x0545, 0x8080, 0x030a, 0x030a) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, ibmcam_table);
diff --git a/drivers/usb/mdc800.c b/drivers/usb/mdc800.c
index 131681c8e..71df829d7 100644
--- a/drivers/usb/mdc800.c
+++ b/drivers/usb/mdc800.c
@@ -870,8 +870,8 @@ static struct file_operations mdc800_device_ops =
static struct usb_device_id mdc800_table [] = {
- { idVendor: MDC800_VENDOR_ID, idProduct: MDC800_PRODUCT_ID },
- { } /* Terminating entry */
+ { USB_DEVICE(MDC800_VENDOR_ID, MDC800_PRODUCT_ID) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, mdc800_table);
diff --git a/drivers/usb/microtek.c b/drivers/usb/microtek.c
index daa18c88f..136805661 100644
--- a/drivers/usb/microtek.c
+++ b/drivers/usb/microtek.c
@@ -824,15 +824,15 @@ const static struct vendor_product mts_supported_products[] =
static struct usb_device_id mts_usb_ids [] =
{
- {idVendor: 0x4ce, idProduct: 0x0300},
- {idVendor: 0x5da, idProduct: 0x0094},
- {idVendor: 0x5da, idProduct: 0x0099},
- {idVendor: 0x5da, idProduct: 0x009a},
- {idVendor: 0x5da, idProduct: 0x00a0},
- {idVendor: 0x5da, idProduct: 0x00a3},
- {idVendor: 0x5da, idProduct: 0x80a3},
- {idVendor: 0x5da, idProduct: 0x80ac},
- { } /* Terminating entry */
+ { USB_DEVICE(0x4ce, 0x0300) },
+ { USB_DEVICE(0x5da, 0x0094) },
+ { USB_DEVICE(0x5da, 0x0099) },
+ { USB_DEVICE(0x5da, 0x009a) },
+ { USB_DEVICE(0x5da, 0x00a0) },
+ { USB_DEVICE(0x5da, 0x00a3) },
+ { USB_DEVICE(0x5da, 0x80a3) },
+ { USB_DEVICE(0x5da, 0x80ac) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, mts_usb_ids);
diff --git a/drivers/usb/net1080.c b/drivers/usb/net1080.c
index eae365d47..3ee1cfaf5 100644
--- a/drivers/usb/net1080.c
+++ b/drivers/usb/net1080.c
@@ -57,11 +57,9 @@
static const struct usb_device_id products [] = {
- { // reference design
- idProduct: 0x1080,
- idVendor: 0x0525,
- driver_info: (unsigned long) "NetChip TurboCONNECT",
- },
+ // reference design
+ { USB_DEVICE(0x1080, 0x525),
+ driver_info: (unsigned long) "NetChip TurboCONNECT" },
// Belkin, ...
{ }, // END
};
diff --git a/drivers/usb/ov511.c b/drivers/usb/ov511.c
index 2f88242f3..7ea9bdbaf 100644
--- a/drivers/usb/ov511.c
+++ b/drivers/usb/ov511.c
@@ -175,9 +175,9 @@ static struct cam_list clist[] = {
};
static __devinitdata struct usb_device_id device_table [] = {
- { idVendor: 0x05a9, idProduct: 0x0511 }, /* OV511 */
- { idVendor: 0x05a9, idProduct: 0xA511 }, /* OV511+ */
- { idVendor: 0x0813, idProduct: 0x0002 }, /* Intel Play Me2Cam OV511+ */
+ { USB_DEVICE(0x05a9, 0x0511) }, /* OV511 */
+ { USB_DEVICE(0x05a9, 0xA511) }, /* OV511+ */
+ { USB_DEVICE(0x0813, 0x0002) }, /* Intel Play Me2Cam OV511+ */
{ } /* Terminating entry */
};
@@ -3228,7 +3228,7 @@ error:
*
***************************************************************************/
-static void * __devinit
+static void *
ov511_probe(struct usb_device *dev, unsigned int ifnum,
const struct usb_device_id *id)
{
@@ -3340,7 +3340,7 @@ error:
}
-static void __devexit
+static void
ov511_disconnect(struct usb_device *dev, void *ptr)
{
struct usb_ov511 *ov511 = (struct usb_ov511 *) ptr;
diff --git a/drivers/usb/pegasus.c b/drivers/usb/pegasus.c
index 3e6ddee49..94e609ad2 100644
--- a/drivers/usb/pegasus.c
+++ b/drivers/usb/pegasus.c
@@ -70,7 +70,8 @@ static struct usb_eth_dev usb_dev_id[] = {
};
static struct usb_device_id pegasus_ids[] = {
-#define PEGASUS_DEV(pn, vid, pid, flags) {idVendor:vid, idProduct:pid},
+#define PEGASUS_DEV(pn, vid, pid, flags) \
+ {match_flags: USB_DEVICE_ID_MATCH_DEVICE, idVendor:vid, idProduct:pid},
#include "pegasus.h"
#undef PEGASUS_DEV
{ }
diff --git a/drivers/usb/printer.c b/drivers/usb/printer.c
index 58061ec90..e734bd2d7 100644
--- a/drivers/usb/printer.c
+++ b/drivers/usb/printer.c
@@ -613,10 +613,10 @@ static struct file_operations usblp_fops = {
};
static struct usb_device_id usblp_ids [] = {
- { bInterfaceClass: 7, bInterfaceSubClass: 1, bInterfaceProtocol: 1},
- { bInterfaceClass: 7, bInterfaceSubClass: 1, bInterfaceProtocol: 2},
- { bInterfaceClass: 7, bInterfaceSubClass: 1, bInterfaceProtocol: 3},
- { } /* Terminating entry */
+ { USB_INTERFACE_INFO(7, 1, 1) },
+ { USB_INTERFACE_INFO(7, 1, 2) },
+ { USB_INTERFACE_INFO(7, 1, 3) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, usblp_ids);
diff --git a/drivers/usb/rio500.c b/drivers/usb/rio500.c
index e54ed66a2..6d7b9043d 100644
--- a/drivers/usb/rio500.c
+++ b/drivers/usb/rio500.c
@@ -463,8 +463,8 @@ file_operations usb_rio_fops = {
};
static struct usb_device_id rio_table [] = {
- { idVendor: 0x0841, idProduct: 1 }, /* Rio 500 */
- { } /* Terminating entry */
+ { USB_DEVICE(0x0841, 1) }, /* Rio 500 */
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, rio_table);
diff --git a/drivers/usb/scanner.c b/drivers/usb/scanner.c
index 2a7e887d9..1816ab151 100644
--- a/drivers/usb/scanner.c
+++ b/drivers/usb/scanner.c
@@ -247,75 +247,74 @@
/* Table of scanners that may work with this driver */
static struct usb_device_id scanner_device_ids [] = {
/* Acer */
- { idVendor: 0x04a5, idProduct: 0x2060 },/* Prisa Acerscan 620U & 640U (!)*/
- { idVendor: 0x04a5, idProduct: 0x2040 },/* Prisa AcerScan 620U (!) */
- { idVendor: 0x04a5, idProduct: 0x2022 },/* Vuego Scan Brisa 340U */
+ { USB_DEVICE(0x04a5, 0x2060) }, /* Prisa Acerscan 620U & 640U (!)*/
+ { USB_DEVICE(0x04a5, 0x2040) }, /* Prisa AcerScan 620U (!) */
+ { USB_DEVICE(0x04a5, 0x2022) }, /* Vuego Scan Brisa 340U */
/* Agfa */
- { idVendor: 0x06bd, idProduct: 0x0001 }, /* SnapScan 1212U */
- { idVendor: 0x06bd, idProduct: 0x0002 }, /* SnapScan 1236U */
- { idVendor: 0x06bd, idProduct: 0x2061 }, /* Another SnapScan 1212U (?)*/
- { idVendor: 0x06bd, idProduct: 0x0100 }, /* SnapScan Touch */
+ { USB_DEVICE(0x06bd, 0x0001) }, /* SnapScan 1212U */
+ { USB_DEVICE(0x06bd, 0x0002) }, /* SnapScan 1236U */
+ { USB_DEVICE(0x06bd, 0x2061) }, /* Another SnapScan 1212U (?)*/
+ { USB_DEVICE(0x06bd, 0x0100) }, /* SnapScan Touch */
/* Colorado -- See Primax/Colorado below */
/* Epson -- See Seiko/Epson below */
/* Genius */
- { idVendor: 0x0458, idProduct: 0x2001 }, /* ColorPage-Vivid Pro */
+ { USB_DEVICE(0x0458, 0x2001) }, /* ColorPage-Vivid Pro */
/* Hewlett Packard */
- { idVendor: 0x03f0, idProduct: 0x0205 }, /* 3300C */
- { idVendor: 0x03f0, idProduct: 0x0101 }, /* 4100C */
- { idVendor: 0x03f0, idProduct: 0x0105 }, /* 4200C */
- { idVendor: 0x03f0, idProduct: 0x0102 }, /* PhotoSmart S20 */
- { idVendor: 0x03f0, idProduct: 0x0401 }, /* 5200C */
- { idVendor: 0x03f0, idProduct: 0x0701 }, /* 5300C */
- { idVendor: 0x03f0, idProduct: 0x0201 }, /* 6200C */
- { idVendor: 0x03f0, idProduct: 0x0601 }, /* 6300C */
+ { USB_DEVICE(0x03f0, 0x0205) }, /* 3300C */
+ { USB_DEVICE(0x03f0, 0x0101) }, /* 4100C */
+ { USB_DEVICE(0x03f0, 0x0105) }, /* 4200C */
+ { USB_DEVICE(0x03f0, 0x0102) }, /* PhotoSmart S20 */
+ { USB_DEVICE(0x03f0, 0x0401) }, /* 5200C */
+ { USB_DEVICE(0x03f0, 0x0701) }, /* 5300C */
+ { USB_DEVICE(0x03f0, 0x0201) }, /* 6200C */
+ { USB_DEVICE(0x03f0, 0x0601) }, /* 6300C */
/* iVina */
- { idVendor: 0x0638, idProduct: 0x0268 }, /* 1200U */
+ { USB_DEVICE(0x0638, 0x0268) }, /* 1200U */
/* Microtek */
- { idVendor: 0x05da, idProduct: 0x0099 }, /* ScanMaker X6 - X6U */
- { idVendor: 0x05da, idProduct: 0x0094 }, /* Phantom 336CX - C3 */
- { idVendor: 0x05da, idProduct: 0x00a0 }, /* Phantom 336CX - C3 #2 */
- { idVendor: 0x05da, idProduct: 0x009a }, /* Phantom C6 */
- { idVendor: 0x05da, idProduct: 0x00a3 }, /* ScanMaker V6USL */
- { idVendor: 0x05da, idProduct: 0x80a3 }, /* ScanMaker V6USL #2 */
- { idVendor: 0x05da, idProduct: 0x80ac }, /* ScanMaker V6UL - SpicyU */
+ { USB_DEVICE(0x05da, 0x0099) }, /* ScanMaker X6 - X6U */
+ { USB_DEVICE(0x05da, 0x0094) }, /* Phantom 336CX - C3 */
+ { USB_DEVICE(0x05da, 0x00a0) }, /* Phantom 336CX - C3 #2 */
+ { USB_DEVICE(0x05da, 0x009a) }, /* Phantom C6 */
+ { USB_DEVICE(0x05da, 0x00a3) }, /* ScanMaker V6USL */
+ { USB_DEVICE(0x05da, 0x80a3) }, /* ScanMaker V6USL #2 */
+ { USB_DEVICE(0x05da, 0x80ac) }, /* ScanMaker V6UL - SpicyU */
/* Mustek */
- { idVendor: 0x055f, idProduct: 0x0001 }, /* 1200 CU */
- { idVendor: 0x0400, idProduct: 0x1000 }, /* BearPaw 1200 */
- { idVendor: 0x055f, idProduct: 0x0002 }, /* 600 CU */
- { idVendor: 0x055f, idProduct: 0x0003 }, /* 1200 USB */
- { idVendor: 0x055f, idProduct: 0x0006 }, /* 1200 UB */
+ { USB_DEVICE(0x055f, 0x0001) }, /* 1200 CU */
+ { USB_DEVICE(0x0400, 0x1000) }, /* BearPaw 1200 */
+ { USB_DEVICE(0x055f, 0x0002) }, /* 600 CU */
+ { USB_DEVICE(0x055f, 0x0003) }, /* 1200 USB */
+ { USB_DEVICE(0x055f, 0x0006) }, /* 1200 UB */
/* Primax/Colorado */
- { idVendor: 0x0461, idProduct: 0x0300 }, /* G2-300 #1 */
- { idVendor: 0x0461, idProduct: 0x0380 }, /* G2-600 #1 */
- { idVendor: 0x0461, idProduct: 0x0301 }, /* G2E-300 #1 */
- { idVendor: 0x0461, idProduct: 0x0381 }, /* ReadyScan 636i */
- { idVendor: 0x0461, idProduct: 0x0302 }, /* G2-300 #2 */
- { idVendor: 0x0461, idProduct: 0x0382 }, /* G2-600 #2 */
- { idVendor: 0x0461, idProduct: 0x0303 }, /* G2E-300 #2 */
- { idVendor: 0x0461, idProduct: 0x0383 }, /* G2E-600 */
- { idVendor: 0x0461, idProduct: 0x0340 }, /* Colorado USB 9600 */
- { idVendor: 0x0461, idProduct: 0x0360 }, /* Colorado USB 19200 */
- { idVendor: 0x0461, idProduct: 0x0341 }, /* Colorado 600u */
- { idVendor: 0x0461, idProduct: 0x0361 }, /* Colorado 1200u */
+ { USB_DEVICE(0x0461, 0x0300) }, /* G2-300 #1 */
+ { USB_DEVICE(0x0461, 0x0380) }, /* G2-600 #1 */
+ { USB_DEVICE(0x0461, 0x0301) }, /* G2E-300 #1 */
+ { USB_DEVICE(0x0461, 0x0381) }, /* ReadyScan 636i */
+ { USB_DEVICE(0x0461, 0x0302) }, /* G2-300 #2 */
+ { USB_DEVICE(0x0461, 0x0382) }, /* G2-600 #2 */
+ { USB_DEVICE(0x0461, 0x0303) }, /* G2E-300 #2 */
+ { USB_DEVICE(0x0461, 0x0383) }, /* G2E-600 */
+ { USB_DEVICE(0x0461, 0x0340) }, /* Colorado USB 9600 */
+ { USB_DEVICE(0x0461, 0x0360) }, /* Colorado USB 19200 */
+ { USB_DEVICE(0x0461, 0x0341) }, /* Colorado 600u */
+ { USB_DEVICE(0x0461, 0x0361) }, /* Colorado 1200u */
/* Seiko/Epson Corp. */
- { idVendor: 0x04b8, idProduct: 0x0101 },/* Perfection 636U and 636Photo */
- { idVendor: 0x04b8, idProduct: 0x0103 },/* Perfection 610 */
- { idVendor: 0x04b8, idProduct: 0x0104 },/* Perfection 1200U and 1200Photo*/
- { idVendor: 0x04b8, idProduct: 0x0106 },/* Stylus Scan 2500 */
- { idVendor: 0x04b8, idProduct: 0x0107 },/* Expression 1600 */
+ { USB_DEVICE(0x04b8, 0x0101) }, /* Perfection 636U and 636Photo */
+ { USB_DEVICE(0x04b8, 0x0103) }, /* Perfection 610 */
+ { USB_DEVICE(0x04b8, 0x0104) }, /* Perfection 1200U and 1200Photo*/
+ { USB_DEVICE(0x04b8, 0x0106) }, /* Stylus Scan 2500 */
+ { USB_DEVICE(0x04b8, 0x0107) }, /* Expression 1600 */
/* Umax */
- { idVendor: 0x1606, idProduct: 0x0010 }, /* Astra 1220U */
- { idVendor: 0x1606, idProduct: 0x0030 }, /* Astra 2000U */
- { idVendor: 0x1606, idProduct: 0x0230 }, /* Astra 2200U */
+ { USB_DEVICE(0x1606, 0x0010) }, /* Astra 1220U */
+ { USB_DEVICE(0x1606, 0x0030) }, /* Astra 2000U */
+ { USB_DEVICE(0x1606, 0x0230) }, /* Astra 2200U */
/* Visioneer */
- { idVendor: 0x04a7, idProduct: 0x0221 }, /* OneTouch 5300 USB */
- { idVendor: 0x04a7, idProduct: 0x0211 }, /* OneTouch 7600 USB */
- { idVendor: 0x04a7, idProduct: 0x0231 }, /* 6100 USB */
- { idVendor: 0x04a7, idProduct: 0x0311 }, /* 6200 EPP/USB */
- { idVendor: 0x04a7, idProduct: 0x0321 }, /* OneTouch 8100 EPP/USB */
- { idVendor: 0x04a7, idProduct: 0x0331 }, /* OneTouch 8600 EPP/USB */
-
- { } /* Terminating entry */
+ { USB_DEVICE(0x04a7, 0x0221) }, /* OneTouch 5300 USB */
+ { USB_DEVICE(0x04a7, 0x0211) }, /* OneTouch 7600 USB */
+ { USB_DEVICE(0x04a7, 0x0231) }, /* 6100 USB */
+ { USB_DEVICE(0x04a7, 0x0311) }, /* 6200 EPP/USB */
+ { USB_DEVICE(0x04a7, 0x0321) }, /* OneTouch 8100 EPP/USB */
+ { USB_DEVICE(0x04a7, 0x0331) }, /* OneTouch 8600 EPP/USB */
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, scanner_device_ids);
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index 8d38a7a9d..c24c5fc8b 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -87,24 +87,24 @@ static void belkin_sa_break_ctl (struct usb_serial_port *port, int break_state
static __devinitdata struct usb_device_id id_table_combined [] = {
- { idVendor: BELKIN_SA_VID, idProduct: BELKIN_SA_PID },
- { idVendor: BELKIN_OLD_VID, idProduct: BELKIN_OLD_PID },
- { idVendor: PERACOM_VID, idProduct: PERACOM_PID },
+ { USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
+ { USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
+ { USB_DEVICE(PERACOM_VID, PERACOM_PID) },
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id belkin_sa_table [] = {
- { idVendor: BELKIN_SA_VID, idProduct: BELKIN_SA_PID },
+ { USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id belkin_old_table [] = {
- { idVendor: BELKIN_OLD_VID, idProduct: BELKIN_OLD_PID },
+ { USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id peracom_table [] = {
- { idVendor: PERACOM_VID, idProduct: PERACOM_PID },
+ { USB_DEVICE(PERACOM_VID, PERACOM_PID) },
{ } /* Terminating entry */
};
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index 060ee5a69..9139f868c 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -473,19 +473,19 @@ static int digi_read_oob_callback( struct urb *urb );
/* Statics */
static __devinitdata struct usb_device_id id_table_combined [] = {
- { idVendor: DIGI_VENDOR_ID, idProduct: DIGI_2_ID },
- { idVendor: DIGI_VENDOR_ID, idProduct: DIGI_4_ID },
- { } /* Terminating entry */
+ { USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) },
+ { USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id id_table_2 [] = {
- { idVendor: DIGI_VENDOR_ID, idProduct: DIGI_2_ID },
- { } /* Terminating entry */
+ { USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id id_table_4 [] = {
- { idVendor: DIGI_VENDOR_ID, idProduct: DIGI_4_ID },
- { } /* Terminating entry */
+ { USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, id_table_combined);
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index 63b5458e5..2d25e4003 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -76,7 +76,7 @@ static void empeg_write_bulk_callback (struct urb *urb);
static void empeg_read_bulk_callback (struct urb *urb);
static __devinitdata struct usb_device_id id_table [] = {
- { idVendor: EMPEG_VENDOR_ID, idProduct: EMPEG_PRODUCT_ID },
+ { USB_DEVICE(EMPEG_VENDOR_ID, EMPEG_PRODUCT_ID) },
{ } /* Terminating entry */
};
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index c52ad0b37..41b7b8628 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -92,8 +92,8 @@
static __devinitdata struct usb_device_id id_table_sio [] = {
- { idVendor: FTDI_VID, idProduct: FTDI_SIO_PID },
- { } /* Terminating entry */
+ { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
+ { } /* Terminating entry */
};
/* THe 8U232AM has the same API as the sio - but it can support MUCH
@@ -102,15 +102,15 @@ static __devinitdata struct usb_device_id id_table_sio [] = {
static __devinitdata struct usb_device_id id_table_8U232AM [] = {
- { idVendor: FTDI_VID, idProduct: FTDI_8U232AM_PID },
- { } /* Terminating entry */
+ { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id id_table_combined [] = {
- { idVendor: FTDI_VID, idProduct: FTDI_SIO_PID },
- { idVendor: FTDI_VID, idProduct: FTDI_8U232AM_PID },
- { } /* Terminating entry */
+ { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, id_table_combined);
diff --git a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h
index 0cd2a70b0..54a403df9 100644
--- a/drivers/usb/serial/keyspan.h
+++ b/drivers/usb/serial/keyspan.h
@@ -303,19 +303,19 @@ static const keyspan_device_details *keyspan_devices[] = {
#define keyspan_usa49w_product_id 0x010a
static __devinitdata struct usb_device_id keyspan_ids_combined[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa18x_pre_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa19_pre_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa19w_pre_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa28_pre_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa28x_pre_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa49w_pre_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa18x_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa19_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa19w_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa28_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa28x_product_id},
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa49w_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_pre_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id)},
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
@@ -325,63 +325,63 @@ MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
behavior for each match. */
static __devinitdata struct usb_device_id keyspan_usa18x_pre_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa18x_pre_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa19_pre_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa19_pre_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa19w_pre_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa19w_pre_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa28_pre_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa28_pre_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa28x_pre_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa28x_pre_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa49w_pre_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa49w_pre_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_pre_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa18x_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa18x_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa19_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa19_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa19w_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa19w_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa28_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa28_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa28x_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa28x_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_usa49w_ids[] = {
- {idVendor: KEYSPAN_VENDOR_ID, idProduct: keyspan_usa49w_product_id},
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id) },
+ { } /* Terminating entry */
};
/* Structs for the devices, pre and post renumeration.
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index b94c9766a..ef5e1263b 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -97,21 +97,21 @@ struct keyspan_pda_private {
#define KEYSPAN_PDA_ID 0x0104 /* no clue */
static __devinitdata struct usb_device_id id_table_combined [] = {
- { idVendor: KEYSPAN_VENDOR_ID, idProduct: KEYSPAN_PDA_FAKE_ID },
- { idVendor: KEYSPAN_VENDOR_ID, idProduct: KEYSPAN_PDA_ID },
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) },
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, id_table_combined);
static __devinitdata struct usb_device_id id_table_std [] = {
- { idVendor: KEYSPAN_VENDOR_ID, idProduct: KEYSPAN_PDA_ID },
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id id_table_fake [] = {
- { idVendor: KEYSPAN_VENDOR_ID, idProduct: KEYSPAN_PDA_FAKE_ID },
- { } /* Terminating entry */
+ { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) },
+ { } /* Terminating entry */
};
static void keyspan_pda_wakeup_write( struct usb_serial_port *port )
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 2b9f99f7c..9265d6376 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -70,8 +70,8 @@ static int omninet_write_room (struct usb_serial_port *port);
static void omninet_shutdown (struct usb_serial *serial);
static __devinitdata struct usb_device_id id_table [] = {
- { idVendor: ZYXEL_VENDOR_ID, idProduct: ZYXEL_OMNINET_ID },
- { } /* Terminating entry */
+ { USB_DEVICE(ZYXEL_VENDOR_ID, ZYXEL_OMNINET_ID) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, id_table);
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index ee1b73893..e363916b9 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -110,7 +110,7 @@ static void visor_read_bulk_callback (struct urb *urb);
static __devinitdata struct usb_device_id id_table [] = {
- { idVendor: HANDSPRING_VENDOR_ID, idProduct: HANDSPRING_VISOR_ID },
+ { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
{ } /* Terminating entry */
};
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 83a822225..46b625832 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -88,19 +88,19 @@
just for the purpose of exporting the autoloading information.
*/
static __devinitdata struct usb_device_id id_table_std [] = {
- {idVendor: CONNECT_TECH_VENDOR_ID, idProduct: CONNECT_TECH_WHITE_HEAT_ID},
- { } /* Terminating entry */
+ { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id id_table_prerenumeration [] = {
- {idVendor: CONNECT_TECH_VENDOR_ID, idProduct: CONNECT_TECH_WHITE_HEAT_ID},
- { } /* Terminating entry */
+ { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
+ { } /* Terminating entry */
};
static __devinitdata struct usb_device_id id_table_combined [] = {
- {idVendor: CONNECT_TECH_VENDOR_ID, idProduct: CONNECT_TECH_WHITE_HEAT_ID},
- {idVendor: CONNECT_TECH_VENDOR_ID, idProduct: CONNECT_TECH_FAKE_WHITE_HEAT_ID},
- { } /* Terminating entry */
+ { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
+ { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, id_table_combined);
diff --git a/drivers/usb/storage/debug.h b/drivers/usb/storage/debug.h
index 83bbceb0e..5123f85f8 100644
--- a/drivers/usb/storage/debug.h
+++ b/drivers/usb/storage/debug.h
@@ -57,8 +57,8 @@ void usb_stor_show_command(Scsi_Cmnd *srb);
void usb_stor_print_Scsi_Cmnd( Scsi_Cmnd* cmd );
void usb_stor_show_sense( unsigned char key,
unsigned char asc, unsigned char ascq );
-#define US_DEBUGP(x...) printk( KERN_DEBUG USB_STORAGE ## x )
-#define US_DEBUGPX(x...) printk( ## x )
+#define US_DEBUGP(x...) printk( KERN_DEBUG USB_STORAGE x )
+#define US_DEBUGPX(x...) printk( x )
#define US_DEBUG(x) x
#else
#define US_DEBUGP(x...)
diff --git a/drivers/usb/usb.c b/drivers/usb/usb.c
index 1f531fd6b..c94aed09f 100644
--- a/drivers/usb/usb.c
+++ b/drivers/usb/usb.c
@@ -570,47 +570,48 @@ usb_match_id(struct usb_device *dev, struct usb_interface *interface,
for (; id->idVendor || id->bDeviceClass || id->bInterfaceClass ||
id->driver_info; id++) {
- if (id->idVendor &&
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) &&
id->idVendor != dev->descriptor.idVendor)
continue;
- if (id->idProduct &&
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) &&
id->idProduct != dev->descriptor.idProduct)
continue;
/* No need to test id->bcdDevice_lo != 0, since 0 is never
greater than any unsigned number. */
- if (id->bcdDevice_lo > dev->descriptor.bcdDevice)
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) &&
+ (id->bcdDevice_lo > dev->descriptor.bcdDevice))
continue;
- if (id->bcdDevice_hi &&
- id->bcdDevice_hi < dev->descriptor.bcdDevice)
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) &&
+ (id->bcdDevice_hi < dev->descriptor.bcdDevice))
continue;
- if (id->bDeviceClass &&
- id->bDeviceClass != dev->descriptor.bDeviceClass)
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) &&
+ (id->bDeviceClass != dev->descriptor.bDeviceClass))
continue;
- if (id->bDeviceSubClass &&
- id->bDeviceSubClass!= dev->descriptor.bDeviceSubClass)
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) &&
+ (id->bDeviceSubClass!= dev->descriptor.bDeviceSubClass))
continue;
- if (id->bDeviceProtocol &&
- id->bDeviceProtocol != dev->descriptor.bDeviceProtocol)
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) &&
+ (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol))
continue;
intf = &interface->altsetting [interface->act_altsetting];
- if (id->bInterfaceClass
- && id->bInterfaceClass != intf->bInterfaceClass)
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_CLASS) &&
+ (id->bInterfaceClass != intf->bInterfaceClass))
continue;
- if (id->bInterfaceSubClass &&
- id->bInterfaceSubClass != intf->bInterfaceSubClass)
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_SUBCLASS) &&
+ (id->bInterfaceSubClass != intf->bInterfaceSubClass))
continue;
- if (id->bInterfaceProtocol
- && id->bInterfaceProtocol != intf->bInterfaceProtocol)
+ if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_PROTOCOL) &&
+ (id->bInterfaceProtocol != intf->bInterfaceProtocol))
continue;
return id;
diff --git a/drivers/usb/usbkbd.c b/drivers/usb/usbkbd.c
index 7fd1ebd7c..08fef2d4c 100644
--- a/drivers/usb/usbkbd.c
+++ b/drivers/usb/usbkbd.c
@@ -257,8 +257,8 @@ static void usb_kbd_disconnect(struct usb_device *dev, void *ptr)
}
static struct usb_device_id usb_kbd_id_table [] = {
- { bInterfaceClass: 3, bInterfaceSubClass: 1, bInterfaceProtocol: 1},
- { } /* Terminating entry */
+ { USB_INTERFACE_INFO(3, 1, 1) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, usb_kbd_id_table);
diff --git a/drivers/usb/usbmouse.c b/drivers/usb/usbmouse.c
index b6473e11a..33aee785d 100644
--- a/drivers/usb/usbmouse.c
+++ b/drivers/usb/usbmouse.c
@@ -171,7 +171,7 @@ static void usb_mouse_disconnect(struct usb_device *dev, void *ptr)
}
static struct usb_device_id usb_mouse_id_table [] = {
- { bInterfaceClass: 3, bInterfaceSubClass: 1, bInterfaceProtocol: 2},
+ { USB_INTERFACE_INFO(3, 1, 2) },
{ } /* Terminating entry */
};
diff --git a/drivers/usb/uss720.c b/drivers/usb/uss720.c
index f97f5f639..591c8f698 100644
--- a/drivers/usb/uss720.c
+++ b/drivers/usb/uss720.c
@@ -625,10 +625,10 @@ static void uss720_disconnect(struct usb_device *usbdev, void *ptr)
/* table of cables that work through this driver */
static struct usb_device_id uss720_table [] = {
- { idVendor: 0x047e, idProduct: 0x1001},
- { idVendor: 0x0557, idProduct: 0x2001},
- { idVendor: 0x0729, idProduct: 0x1284},
- { } /* Terminating entry */
+ { USB_DEVICE(0x047e, 0x1001) },
+ { USB_DEVICE(0x0557, 0x2001) },
+ { USB_DEVICE(0x0729, 0x1284) },
+ { } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, uss720_table);
diff --git a/drivers/usb/wacom.c b/drivers/usb/wacom.c
index e4ecaeba4..b869cd822 100644
--- a/drivers/usb/wacom.c
+++ b/drivers/usb/wacom.c
@@ -300,12 +300,12 @@ struct wacom_features wacom_features[] = {
};
struct usb_device_id wacom_ids[] = {
- { idVendor: USB_VENDOR_ID_WACOM, idProduct: 0x10, driver_info: 0 },
- { idVendor: USB_VENDOR_ID_WACOM, idProduct: 0x20, driver_info: 1 },
- { idVendor: USB_VENDOR_ID_WACOM, idProduct: 0x21, driver_info: 2 },
- { idVendor: USB_VENDOR_ID_WACOM, idProduct: 0x22, driver_info: 3 },
- { idVendor: USB_VENDOR_ID_WACOM, idProduct: 0x23, driver_info: 4 },
- { idVendor: USB_VENDOR_ID_WACOM, idProduct: 0x24, driver_info: 5 },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x10), driver_info: 0 },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20), driver_info: 1 },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21), driver_info: 2 },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22), driver_info: 3 },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x23), driver_info: 4 },
+ { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x24), driver_info: 5 },
{ }
};