diff options
Diffstat (limited to 'drivers/media/video/gspca/w996Xcf.c')
-rw-r--r-- | drivers/media/video/gspca/w996Xcf.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/media/video/gspca/w996Xcf.c b/drivers/media/video/gspca/w996Xcf.c index 2fffe203bed8..38a68591ce48 100644 --- a/drivers/media/video/gspca/w996Xcf.c +++ b/drivers/media/video/gspca/w996Xcf.c | |||
@@ -31,14 +31,10 @@ | |||
31 | the sensor drivers to v4l2 sub drivers, and properly split of this | 31 | the sensor drivers to v4l2 sub drivers, and properly split of this |
32 | driver from ov519.c */ | 32 | driver from ov519.c */ |
33 | 33 | ||
34 | /* The CONEX_CAM define for jpeg.h needs renaming, now its used here too */ | ||
35 | #define CONEX_CAM | ||
36 | #include "jpeg.h" | ||
37 | |||
38 | #define W9968CF_I2C_BUS_DELAY 4 /* delay in us for I2C bit r/w operations */ | 34 | #define W9968CF_I2C_BUS_DELAY 4 /* delay in us for I2C bit r/w operations */ |
39 | 35 | ||
40 | #define Y_QUANTABLE (sd->jpeg_hdr + JPEG_QT0_OFFSET) | 36 | #define Y_QUANTABLE (&sd->jpeg_hdr[JPEG_QT0_OFFSET]) |
41 | #define UV_QUANTABLE (sd->jpeg_hdr + JPEG_QT1_OFFSET) | 37 | #define UV_QUANTABLE (&sd->jpeg_hdr[JPEG_QT1_OFFSET]) |
42 | 38 | ||
43 | static const struct v4l2_pix_format w9968cf_vga_mode[] = { | 39 | static const struct v4l2_pix_format w9968cf_vga_mode[] = { |
44 | {160, 120, V4L2_PIX_FMT_UYVY, V4L2_FIELD_NONE, | 40 | {160, 120, V4L2_PIX_FMT_UYVY, V4L2_FIELD_NONE, |
@@ -509,11 +505,6 @@ static int w9968cf_mode_init_regs(struct sd *sd) | |||
509 | if (w9968cf_vga_mode[sd->gspca_dev.curr_mode].pixelformat == | 505 | if (w9968cf_vga_mode[sd->gspca_dev.curr_mode].pixelformat == |
510 | V4L2_PIX_FMT_JPEG) { | 506 | V4L2_PIX_FMT_JPEG) { |
511 | /* We may get called multiple times (usb isoc bw negotiat.) */ | 507 | /* We may get called multiple times (usb isoc bw negotiat.) */ |
512 | if (!sd->jpeg_hdr) | ||
513 | sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); | ||
514 | if (!sd->jpeg_hdr) | ||
515 | return -ENOMEM; | ||
516 | |||
517 | jpeg_define(sd->jpeg_hdr, sd->gspca_dev.height, | 508 | jpeg_define(sd->jpeg_hdr, sd->gspca_dev.height, |
518 | sd->gspca_dev.width, 0x22); /* JPEG 420 */ | 509 | sd->gspca_dev.width, 0x22); /* JPEG 420 */ |
519 | jpeg_set_qual(sd->jpeg_hdr, sd->quality); | 510 | jpeg_set_qual(sd->jpeg_hdr, sd->quality); |
@@ -562,9 +553,6 @@ static void w9968cf_stop0(struct sd *sd) | |||
562 | reg_w(sd, 0x39, 0x0000); /* disable JPEG encoder */ | 553 | reg_w(sd, 0x39, 0x0000); /* disable JPEG encoder */ |
563 | reg_w(sd, 0x16, 0x0000); /* stop video capture */ | 554 | reg_w(sd, 0x16, 0x0000); /* stop video capture */ |
564 | } | 555 | } |
565 | |||
566 | kfree(sd->jpeg_hdr); | ||
567 | sd->jpeg_hdr = NULL; | ||
568 | } | 556 | } |
569 | 557 | ||
570 | /* The w9968cf docs say that a 0 sized packet means EOF (and also SOF | 558 | /* The w9968cf docs say that a 0 sized packet means EOF (and also SOF |