diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-05-04 05:46:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:14:40 -0400 |
commit | 4aa0d037a6c8e6b37ecfd986a444f83190c32a21 (patch) | |
tree | 37ec7366de97498236b82048e7c10e0d6ebe22e2 /drivers/media/video/gspca/stk014.c | |
parent | e2997a72ddfafc25bd0c8f1f52bcf41979d5a559 (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/stk014.c')
-rw-r--r-- | drivers/media/video/gspca/stk014.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/stk014.c b/drivers/media/video/gspca/stk014.c index 8fd4ff01362e..2e4cf64442ac 100644 --- a/drivers/media/video/gspca/stk014.c +++ b/drivers/media/video/gspca/stk014.c | |||
@@ -24,8 +24,8 @@ | |||
24 | #include "gspca.h" | 24 | #include "gspca.h" |
25 | #include "jpeg.h" | 25 | #include "jpeg.h" |
26 | 26 | ||
27 | #define DRIVER_VERSION_NUMBER KERNEL_VERSION(0, 0, 22) | 27 | #define DRIVER_VERSION_NUMBER KERNEL_VERSION(0, 1, 0) |
28 | static const char version[] = "0.0.22"; | 28 | static const char version[] = "0.1.0"; |
29 | 29 | ||
30 | MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>"); | 30 | MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>"); |
31 | MODULE_DESCRIPTION("Syntek DV4000 (STK014) USB Camera Driver"); | 31 | MODULE_DESCRIPTION("Syntek DV4000 (STK014) USB Camera Driver"); |
@@ -390,6 +390,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
390 | int len) /* iso packet length */ | 390 | int len) /* iso packet length */ |
391 | { | 391 | { |
392 | int l; | 392 | int l; |
393 | static unsigned char ffd9[] = {0xff, 0xd9}; | ||
393 | 394 | ||
394 | /* a frame starts with: | 395 | /* a frame starts with: |
395 | * - 0xff 0xfe | 396 | * - 0xff 0xfe |
@@ -445,7 +446,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
445 | if (len > frame->v4l2_buf.bytesused - 2 - l) | 446 | if (len > frame->v4l2_buf.bytesused - 2 - l) |
446 | len = frame->v4l2_buf.bytesused - 2 - l; | 447 | len = frame->v4l2_buf.bytesused - 2 - l; |
447 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); | 448 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); |
448 | gspca_frame_add(gspca_dev, LAST_PACKET, frame, "\xff\xd9", 2); | 449 | gspca_frame_add(gspca_dev, LAST_PACKET, frame, ffd9, 2); |
449 | } | 450 | } |
450 | 451 | ||
451 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) | 452 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) |