Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Evans <spse@secret.org.uk>2002-05-02 01:44:50 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2002-05-02 01:44:50 -0700
commit4f70b4166ad4a1933f0d279eb9993be701518a9b (patch)
treef72a09a482fff3ccabad85c308bba5a57d2388c1
parent1eb9c8388bf4a5771bcdbc6c0f5eeccf6029bf94 (diff)
[PATCH] 2.5.12 - make usbvideo_register take a usb_device_id table
This patch makes usbvideo_register take a usb_device_id argument which it can then pass to usb_register via the struct usb_device. Currently it passes NULL.
-rw-r--r--drivers/usb/media/ibmcam.c23
-rw-r--r--drivers/usb/media/konicawc.c3
-rw-r--r--drivers/usb/media/ultracam.c18
-rw-r--r--drivers/usb/media/usbvideo.c4
-rw-r--r--drivers/usb/media/usbvideo.h3
5 files changed, 28 insertions, 23 deletions
diff --git a/drivers/usb/media/ibmcam.c b/drivers/usb/media/ibmcam.c
index f8c3ea116b82..99a92a58e223 100644
--- a/drivers/usb/media/ibmcam.c
+++ b/drivers/usb/media/ibmcam.c
@@ -3899,6 +3899,17 @@ static void *ibmcam_probe(struct usb_device *dev, unsigned int ifnum, const stru
return uvd;
}
+
+static struct usb_device_id id_table[] = {
+ { USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0002, 0x0002) }, /* Model 1 */
+ { USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 2 */
+ { USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0301, 0x0301) }, /* Model 3 */
+ { USB_DEVICE_VER(IBMCAM_VENDOR_ID, NETCAM_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 4 */
+ { USB_DEVICE_VER(IBMCAM_VENDOR_ID, VEO_800C_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 2 */
+ { USB_DEVICE_VER(IBMCAM_VENDOR_ID, VEO_800D_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 4 */
+ { } /* Terminating entry */
+};
+
/*
* ibmcam_init()
*
@@ -3926,7 +3937,8 @@ static int __init ibmcam_init(void)
sizeof(ibmcam_t),
"ibmcam",
&cbTbl,
- THIS_MODULE);
+ THIS_MODULE,
+ id_table);
}
static void __exit ibmcam_cleanup(void)
@@ -3934,15 +3946,6 @@ static void __exit ibmcam_cleanup(void)
usbvideo_Deregister(&cams);
}
-static __devinitdata struct usb_device_id id_table[] = {
- { USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0002, 0x0002) }, /* Model 1 */
- { USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 2 */
- { USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0301, 0x0301) }, /* Model 3 */
- { USB_DEVICE_VER(IBMCAM_VENDOR_ID, NETCAM_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 4 */
- { USB_DEVICE_VER(IBMCAM_VENDOR_ID, VEO_800C_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 2 */
- { USB_DEVICE_VER(IBMCAM_VENDOR_ID, VEO_800D_PRODUCT_ID, 0x030a, 0x030a) }, /* Model 4 */
- { } /* Terminating entry */
-};
MODULE_DEVICE_TABLE(usb, id_table);
module_init(ibmcam_init);
diff --git a/drivers/usb/media/konicawc.c b/drivers/usb/media/konicawc.c
index e34316b7cba7..e8febe654132 100644
--- a/drivers/usb/media/konicawc.c
+++ b/drivers/usb/media/konicawc.c
@@ -767,7 +767,8 @@ static int __init konicawc_init(void)
sizeof(struct konicawc),
"konicawc",
&cbTbl,
- THIS_MODULE);
+ THIS_MODULE,
+ id_table);
}
diff --git a/drivers/usb/media/ultracam.c b/drivers/usb/media/ultracam.c
index 94b261d38551..c07f87fc0a27 100644
--- a/drivers/usb/media/ultracam.c
+++ b/drivers/usb/media/ultracam.c
@@ -659,6 +659,12 @@ static void *ultracam_probe(struct usb_device *dev, unsigned int ifnum ,const st
return uvd;
}
+
+static struct usb_device_id id_table[] = {
+ { USB_DEVICE(ULTRACAM_VENDOR_ID, ULTRACAM_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
+
/*
* ultracam_init()
*
@@ -682,7 +688,8 @@ static int __init ultracam_init(void)
sizeof(ultracam_t),
"ultracam",
&cbTbl,
- THIS_MODULE);
+ THIS_MODULE,
+ id_table);
}
static void __exit ultracam_cleanup(void)
@@ -690,16 +697,7 @@ static void __exit ultracam_cleanup(void)
usbvideo_Deregister(&cams);
}
-#if defined(usb_device_id_ver)
-
-static __devinitdata struct usb_device_id id_table[] = {
- { USB_DEVICE(ULTRACAM_VENDOR_ID, ULTRACAM_PRODUCT_ID) },
- { } /* Terminating entry */
-};
MODULE_DEVICE_TABLE(usb, id_table);
-
-
-#endif /* defined(usb_device_id_ver) */
MODULE_LICENSE("GPL");
module_init(ultracam_init);
diff --git a/drivers/usb/media/usbvideo.c b/drivers/usb/media/usbvideo.c
index 93941aab200b..7a5c4b5d8aaa 100644
--- a/drivers/usb/media/usbvideo.c
+++ b/drivers/usb/media/usbvideo.c
@@ -749,7 +749,8 @@ int usbvideo_register(
const int num_extra,
const char *driverName,
const usbvideo_cb_t *cbTbl,
- struct module *md )
+ struct module *md,
+ const struct usb_device_id *id_table)
{
static const char proc[] = "usbvideo_register";
usbvideo_t *cams;
@@ -839,6 +840,7 @@ int usbvideo_register(
cams->usbdrv.name = cams->drvName;
cams->usbdrv.probe = cams->cb.probe;
cams->usbdrv.disconnect = cams->cb.disconnect;
+ cams->usbdrv.id_table = id_table;
#if USES_PROC_FS
if (cams->uses_procfs) {
diff --git a/drivers/usb/media/usbvideo.h b/drivers/usb/media/usbvideo.h
index 507d56984de8..1c89f6984e05 100644
--- a/drivers/usb/media/usbvideo.h
+++ b/drivers/usb/media/usbvideo.h
@@ -327,7 +327,8 @@ int usbvideo_register(
const int num_extra,
const char *driverName,
const usbvideo_cb_t *cbTable,
- struct module *md);
+ struct module *md,
+ const struct usb_device_id *id_table);
uvd_t *usbvideo_AllocateDevice(usbvideo_t *cams);
int usbvideo_RegisterVideoDevice(uvd_t *uvd);
void usbvideo_Deregister(usbvideo_t **uvt);