aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/usb/zc0301.txt12
-rw-r--r--drivers/usb/media/zc0301.h5
-rw-r--r--drivers/usb/media/zc0301_core.c6
-rw-r--r--drivers/usb/media/zc0301_sensor.h12
4 files changed, 16 insertions, 19 deletions
diff --git a/Documentation/usb/zc0301.txt b/Documentation/usb/zc0301.txt
index 095838420e82..f55262c6733b 100644
--- a/Documentation/usb/zc0301.txt
+++ b/Documentation/usb/zc0301.txt
@@ -201,14 +201,14 @@ devices mounting the ZC0301 Image Processor and Control Chips:
201 201
202Vendor ID Product ID 202Vendor ID Product ID
203--------- ---------- 203--------- ----------
2040x10fd 0x8050 2040x041e 0x4017
2050x041e 0x0417 2050x041e 0x401c
2060x041e 0x041e 2060x041e 0x401e
2070x041e 0x081c 2070x041e 0x4034
2080x041e 0x0834 2080x041e 0x4035
2090x041e 0x0835
2100x046d 0x08ae 2090x046d 0x08ae
2110x0ac8 0x0301 2100x0ac8 0x0301
2110x10fd 0x8050
212 212
213The list above does not imply that all those devices work with this driver: up 213The list above does not imply that all those devices work with this driver: up
214until now only the ones that mount the following image sensors are supported; 214until now only the ones that mount the following image sensors are supported;
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 {
134struct zc0301_device* 134struct zc0301_device*
135zc0301_match_id(struct zc0301_device* cam, const struct usb_device_id *id) 135zc0301_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
143void 140void
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 \
60static const struct usb_device_id zc0301_id_table[] = { \ 60static 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