aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/pac207.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-05-04 05:46:21 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:14:40 -0400
commit4aa0d037a6c8e6b37ecfd986a444f83190c32a21 (patch)
tree37ec7366de97498236b82048e7c10e0d6ebe22e2 /drivers/media/video/gspca/pac207.c
parente2997a72ddfafc25bd0c8f1f52bcf41979d5a559 (diff)
V4L/DVB (8154): Fix protection problems in the main driver.
- Protect format change when streaming active. - Protect USB exchanges on close. - Set a timeout in frame wait. - Have only one capture file and free the resources when closing this file. - Simplify the URB buffer. - Don't reset the control values at open time in pac207. - Fix compilation warnings of stk014. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/pac207.c')
-rw-r--r--drivers/media/video/gspca/pac207.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c
index ac16c7352892..57d48f51e3a0 100644
--- a/drivers/media/video/gspca/pac207.c
+++ b/drivers/media/video/gspca/pac207.c
@@ -27,8 +27,8 @@
27 27
28#include "gspca.h" 28#include "gspca.h"
29 29
30#define DRIVER_VERSION_NUMBER KERNEL_VERSION(0, 0, 30) 30#define DRIVER_VERSION_NUMBER KERNEL_VERSION(0, 1, 1)
31static const char version[] = "0.0.30"; 31static const char version[] = "0.1.1";
32 32
33MODULE_AUTHOR("Hans de Goede <j.w.r.degoede@hhs.nl>"); 33MODULE_AUTHOR("Hans de Goede <j.w.r.degoede@hhs.nl>");
34MODULE_DESCRIPTION("Pixart PAC207"); 34MODULE_DESCRIPTION("Pixart PAC207");
@@ -251,6 +251,7 @@ int pac207_read_reg(struct gspca_dev *gspca_dev, u16 index)
251static int sd_config(struct gspca_dev *gspca_dev, 251static int sd_config(struct gspca_dev *gspca_dev,
252 const struct usb_device_id *id) 252 const struct usb_device_id *id)
253{ 253{
254 struct sd *sd = (struct sd *) gspca_dev;
254 struct cam *cam; 255 struct cam *cam;
255 u8 idreg[2]; 256 u8 idreg[2];
256 257
@@ -282,6 +283,9 @@ static int sd_config(struct gspca_dev *gspca_dev,
282 cam->epaddr = 0x05; 283 cam->epaddr = 0x05;
283 cam->cam_mode = sif_mode; 284 cam->cam_mode = sif_mode;
284 cam->nmodes = ARRAY_SIZE(sif_mode); 285 cam->nmodes = ARRAY_SIZE(sif_mode);
286 sd->brightness = PAC207_BRIGHTNESS_DEFAULT;
287 sd->exposure = PAC207_EXPOSURE_DEFAULT;
288 sd->gain = PAC207_GAIN_DEFAULT;
285 289
286 return 0; 290 return 0;
287} 291}
@@ -291,9 +295,6 @@ static int sd_open(struct gspca_dev *gspca_dev)
291{ 295{
292 struct sd *sd = (struct sd *) gspca_dev; 296 struct sd *sd = (struct sd *) gspca_dev;
293 297
294 sd->brightness = PAC207_BRIGHTNESS_DEFAULT;
295 sd->exposure = PAC207_EXPOSURE_DEFAULT;
296 sd->gain = PAC207_GAIN_DEFAULT;
297 sd->autogain = 1; 298 sd->autogain = 1;
298 299
299 return 0; 300 return 0;