aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zc0301
diff options
context:
space:
mode:
authorLuca Risolia <luca.risolia@studio.unibo.it>2006-04-26 09:19:49 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 00:59:26 -0400
commita87cde0bfbf0020a5d0a80f94a80fc1470546999 (patch)
treefbfde92494794a11bcef89d633f6c5eb22fd354b /drivers/media/video/zc0301
parent81ad3428660d06f8faa45eacdf6eb0f1424cd404 (diff)
V4L/DVB (3906): ZC0301 driver updates
This is a patch fixing a small bug in zc0301_start_transfer() introduced in the ZC0301 driver v1.04. Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/zc0301')
-rw-r--r--drivers/media/video/zc0301/zc0301_core.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c
index 7b7a3629bd81..2b5ce2d79c00 100644
--- a/drivers/media/video/zc0301/zc0301_core.c
+++ b/drivers/media/video/zc0301/zc0301_core.c
@@ -1,5 +1,5 @@
1/*************************************************************************** 1/***************************************************************************
2 * Video4Linux2 driver for ZC0301 Image Processor and Control Chip * 2 * Video4Linux2 driver for ZC0301[P] Image Processor and Control Chip *
3 * * 3 * *
4 * Copyright (C) 2006 by Luca Risolia <luca.risolia@studio.unibo.it> * 4 * Copyright (C) 2006 by Luca Risolia <luca.risolia@studio.unibo.it> *
5 * * 5 * *
@@ -47,13 +47,13 @@
47 47
48/*****************************************************************************/ 48/*****************************************************************************/
49 49
50#define ZC0301_MODULE_NAME "V4L2 driver for ZC0301 " \ 50#define ZC0301_MODULE_NAME "V4L2 driver for ZC0301[P] " \
51 "Image Processor and Control Chip" 51 "Image Processor and Control Chip"
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.04" 55#define ZC0301_MODULE_VERSION "1:1.05"
56#define ZC0301_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 4) 56#define ZC0301_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 5)
57 57
58/*****************************************************************************/ 58/*****************************************************************************/
59 59
@@ -427,10 +427,11 @@ resubmit_urb:
427static int zc0301_start_transfer(struct zc0301_device* cam) 427static int zc0301_start_transfer(struct zc0301_device* cam)
428{ 428{
429 struct usb_device *udev = cam->usbdev; 429 struct usb_device *udev = cam->usbdev;
430 struct usb_host_interface* altsetting = usb_altnum_to_altsetting(
431 usb_ifnum_to_if(udev, 0),
432 ZC0301_ALTERNATE_SETTING);
433 const unsigned int psz = altsetting->endpoint[0].desc.wMaxPacketSize;
430 struct urb* urb; 434 struct urb* urb;
431 const unsigned int wMaxPacketSize[] = {0, 128, 192, 256, 384,
432 512, 768, 1023};
433 const unsigned int psz = wMaxPacketSize[ZC0301_ALTERNATE_SETTING];
434 s8 i, j; 435 s8 i, j;
435 int err = 0; 436 int err = 0;
436 437
@@ -1914,7 +1915,7 @@ zc0301_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
1914 1915
1915 mutex_init(&cam->dev_mutex); 1916 mutex_init(&cam->dev_mutex);
1916 1917
1917 DBG(2, "ZC0301 Image Processor and Control Chip detected " 1918 DBG(2, "ZC0301[P] Image Processor and Control Chip detected "
1918 "(vid/pid 0x%04X/0x%04X)",id->idVendor, id->idProduct); 1919 "(vid/pid 0x%04X/0x%04X)",id->idVendor, id->idProduct);
1919 1920
1920 for (i = 0; zc0301_sensor_table[i]; i++) { 1921 for (i = 0; zc0301_sensor_table[i]; i++) {
@@ -1936,7 +1937,7 @@ zc0301_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
1936 cam->state |= DEV_MISCONFIGURED; 1937 cam->state |= DEV_MISCONFIGURED;
1937 } 1938 }
1938 1939
1939 strcpy(cam->v4ldev->name, "ZC0301 PC Camera"); 1940 strcpy(cam->v4ldev->name, "ZC0301[P] PC Camera");
1940 cam->v4ldev->owner = THIS_MODULE; 1941 cam->v4ldev->owner = THIS_MODULE;
1941 cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES; 1942 cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES;
1942 cam->v4ldev->hardware = 0; 1943 cam->v4ldev->hardware = 0;