patch-2.4.0-test11 linux/drivers/usb/uss720.c
Next file: linux/drivers/usb/wacom.c
Previous file: linux/drivers/usb/usbmouse.c
Back to the patch index
Back to the overall index
- Lines: 57
- Date:
Sat Nov 11 18:17:09 2000
- Orig file:
v2.4.0-test10/linux/drivers/usb/uss720.c
- Orig date:
Thu Sep 7 08:36:40 2000
diff -u --recursive --new-file v2.4.0-test10/linux/drivers/usb/uss720.c linux/drivers/usb/uss720.c
@@ -32,6 +32,7 @@
* 0.3 10.08.99 fixing merge errors
* 0.4 13.08.99 Added Vendor/Product ID of Brad Hard's cable
* 0.5 20.09.99 usb_control_msg wrapper used
+ * Nov01.00 usb_device_table support by Adam J. Richter
*
*/
@@ -534,7 +535,8 @@
/* --------------------------------------------------------------------- */
-static void * uss720_probe(struct usb_device *usbdev, unsigned int ifnum)
+static void * uss720_probe(struct usb_device *usbdev, unsigned int ifnum,
+ const struct usb_device_id *id)
{
struct usb_interface_descriptor *interface;
struct usb_endpoint_descriptor *endpoint;
@@ -542,11 +544,6 @@
struct parport *pp;
int i;
- if ((usbdev->descriptor.idVendor != 0x047e || usbdev->descriptor.idProduct != 0x1001) &&
- (usbdev->descriptor.idVendor != 0x0557 || usbdev->descriptor.idProduct != 0x2001) &&
- (usbdev->descriptor.idVendor != 0x0729 || usbdev->descriptor.idProduct != 0x1284))
- return NULL;
-
printk(KERN_DEBUG "uss720: probe: vendor id 0x%x, device id 0x%x\n",
usbdev->descriptor.idVendor, usbdev->descriptor.idProduct);
@@ -626,11 +623,22 @@
MOD_DEC_USE_COUNT;
}
+/* 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 */
+};
+
+MODULE_DEVICE_TABLE (usb, uss720_table);
+
+
static struct usb_driver uss720_driver = {
- "uss720",
- uss720_probe,
- uss720_disconnect,
- { NULL, NULL }
+ name: "uss720",
+ probe: uss720_probe,
+ disconnect: uss720_disconnect,
+ id_table: uss720_table,
};
/* --------------------------------------------------------------------- */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)