diff options
author | Luca Risolia <luca.risolia@studio.unibo.it> | 2006-03-03 04:58:39 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:50:01 -0500 |
commit | 6e0755a4b2a41a8cd5839db69532d07262294b41 (patch) | |
tree | e180c082ba1b05f525a90ee6f1ea51543f710a5d /drivers/usb | |
parent | 2e56222ed52cec40427fa89f23b228232e3e327e (diff) |
[PATCH] USB: ZC0301 driver bugfix
ZC0301 driver bugfix.
Use correct PID/VID USB entries.
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/media/zc0301.h | 5 | ||||
-rw-r--r-- | drivers/usb/media/zc0301_core.c | 6 | ||||
-rw-r--r-- | drivers/usb/media/zc0301_sensor.h | 12 |
3 files changed, 10 insertions, 13 deletions
diff --git a/drivers/usb/media/zc0301.h b/drivers/usb/media/zc0301.h index 9ba9135e824b..8e0655140e60 100644 --- a/drivers/usb/media/zc0301.h +++ b/drivers/usb/media/zc0301.h | |||
@@ -134,10 +134,7 @@ struct zc0301_device { | |||
134 | struct zc0301_device* | 134 | struct zc0301_device* |
135 | zc0301_match_id(struct zc0301_device* cam, const struct usb_device_id *id) | 135 | zc0301_match_id(struct zc0301_device* cam, const struct usb_device_id *id) |
136 | { | 136 | { |
137 | if (usb_match_id(usb_ifnum_to_if(cam->usbdev, 0), id)) | 137 | return usb_match_id(usb_ifnum_to_if(cam->usbdev, 0), id) ? cam : NULL; |
138 | return cam; | ||
139 | |||
140 | return NULL; | ||
141 | } | 138 | } |
142 | 139 | ||
143 | void | 140 | void |
diff --git a/drivers/usb/media/zc0301_core.c b/drivers/usb/media/zc0301_core.c index 5773688d3dae..4036c6268bff 100644 --- a/drivers/usb/media/zc0301_core.c +++ b/drivers/usb/media/zc0301_core.c | |||
@@ -52,8 +52,8 @@ | |||
52 | #define ZC0301_MODULE_AUTHOR "(C) 2006 Luca Risolia" | 52 | #define ZC0301_MODULE_AUTHOR "(C) 2006 Luca Risolia" |
53 | #define ZC0301_AUTHOR_EMAIL "<luca.risolia@studio.unibo.it>" | 53 | #define ZC0301_AUTHOR_EMAIL "<luca.risolia@studio.unibo.it>" |
54 | #define ZC0301_MODULE_LICENSE "GPL" | 54 | #define ZC0301_MODULE_LICENSE "GPL" |
55 | #define ZC0301_MODULE_VERSION "1:1.02" | 55 | #define ZC0301_MODULE_VERSION "1:1.03" |
56 | #define ZC0301_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 2) | 56 | #define ZC0301_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 3) |
57 | 57 | ||
58 | /*****************************************************************************/ | 58 | /*****************************************************************************/ |
59 | 59 | ||
@@ -637,7 +637,6 @@ static void zc0301_release_resources(struct zc0301_device* cam) | |||
637 | DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->minor); | 637 | DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->minor); |
638 | video_set_drvdata(cam->v4ldev, NULL); | 638 | video_set_drvdata(cam->v4ldev, NULL); |
639 | video_unregister_device(cam->v4ldev); | 639 | video_unregister_device(cam->v4ldev); |
640 | usb_put_dev(cam->usbdev); | ||
641 | kfree(cam->control_buffer); | 640 | kfree(cam->control_buffer); |
642 | } | 641 | } |
643 | 642 | ||
@@ -727,6 +726,7 @@ static int zc0301_release(struct inode* inode, struct file* filp) | |||
727 | 726 | ||
728 | if (cam->state & DEV_DISCONNECTED) { | 727 | if (cam->state & DEV_DISCONNECTED) { |
729 | zc0301_release_resources(cam); | 728 | zc0301_release_resources(cam); |
729 | usb_put_dev(cam->usbdev); | ||
730 | mutex_unlock(&cam->dev_mutex); | 730 | mutex_unlock(&cam->dev_mutex); |
731 | kfree(cam); | 731 | kfree(cam); |
732 | return 0; | 732 | return 0; |
diff --git a/drivers/usb/media/zc0301_sensor.h b/drivers/usb/media/zc0301_sensor.h index e3cb6cc920ca..cf0965a81d01 100644 --- a/drivers/usb/media/zc0301_sensor.h +++ b/drivers/usb/media/zc0301_sensor.h | |||
@@ -58,14 +58,14 @@ zc0301_attach_sensor(struct zc0301_device* cam, struct zc0301_sensor* sensor); | |||
58 | 58 | ||
59 | #define ZC0301_ID_TABLE \ | 59 | #define ZC0301_ID_TABLE \ |
60 | static const struct usb_device_id zc0301_id_table[] = { \ | 60 | static const struct usb_device_id zc0301_id_table[] = { \ |
61 | { ZC0301_USB_DEVICE(0x10fd, 0x8050, 0xff), }, /* TAS5130D */ \ | 61 | { ZC0301_USB_DEVICE(0x041e, 0x4017, 0xff), }, \ |
62 | { ZC0301_USB_DEVICE(0x041e, 0x0417, 0xff), }, \ | 62 | { ZC0301_USB_DEVICE(0x041e, 0x401c, 0xff), }, /* PAS106 */ \ |
63 | { ZC0301_USB_DEVICE(0x041e, 0x041e, 0xff), }, /* HV7131B */ \ | 63 | { ZC0301_USB_DEVICE(0x041e, 0x401e, 0xff), }, /* HV7131B */ \ |
64 | { ZC0301_USB_DEVICE(0x041e, 0x081c, 0xff), }, /* PAS106 */ \ | 64 | { ZC0301_USB_DEVICE(0x041e, 0x4034, 0xff), }, /* PAS106 */ \ |
65 | { ZC0301_USB_DEVICE(0x041e, 0x0834, 0xff), }, /* PAS106 */ \ | 65 | { ZC0301_USB_DEVICE(0x041e, 0x4035, 0xff), }, /* PAS106 */ \ |
66 | { ZC0301_USB_DEVICE(0x041e, 0x0835, 0xff), }, /* PAS106 */ \ | ||
67 | { ZC0301_USB_DEVICE(0x046d, 0x08ae, 0xff), }, /* PAS202BCB */ \ | 66 | { ZC0301_USB_DEVICE(0x046d, 0x08ae, 0xff), }, /* PAS202BCB */ \ |
68 | { ZC0301_USB_DEVICE(0x0ac8, 0x0301, 0xff), }, \ | 67 | { ZC0301_USB_DEVICE(0x0ac8, 0x0301, 0xff), }, \ |
68 | { ZC0301_USB_DEVICE(0x10fd, 0x8050, 0xff), }, /* TAS5130D */ \ | ||
69 | { } \ | 69 | { } \ |
70 | }; | 70 | }; |
71 | 71 | ||