diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-06-04 05:26:42 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 14:06:08 -0300 |
commit | 9a731a3265a808c806766a28e2b62e9da78f9ac6 (patch) | |
tree | c7e6465a5233a6e0579f81d46f0de80a8213ce49 /drivers/media/video/gspca/zc3xx.c | |
parent | 456c9acb63fa5c3974c72309f831bd0e1f34b6d9 (diff) | |
download | kernel_samsung_smdk4412-9a731a3265a808c806766a28e2b62e9da78f9ac6.tar.gz kernel_samsung_smdk4412-9a731a3265a808c806766a28e2b62e9da78f9ac6.tar.bz2 kernel_samsung_smdk4412-9a731a3265a808c806766a28e2b62e9da78f9ac6.zip |
V4L/DVB: gspca - JPEG subdrivers: Don't allocate the JPEG header
The JPEG header is now included in the subdriver structure instead
of being allocated and freed at capture start and stop.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/zc3xx.c')
-rw-r--r-- | drivers/media/video/gspca/zc3xx.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index d02aa5c8472..0a043719f76 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c @@ -75,7 +75,7 @@ struct sd { #define SENSOR_MAX 19 unsigned short chip_revision; - u8 *jpeg_hdr; + u8 jpeg_hdr[JPEG_HDR_SZ]; }; /* V4L2 controls supported by the driver */ @@ -6798,9 +6798,6 @@ static int sd_start(struct gspca_dev *gspca_dev) }; /* create the JPEG header */ - sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); - if (!sd->jpeg_hdr) - return -ENOMEM; jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, 0x21); /* JPEG 422 */ jpeg_set_qual(sd->jpeg_hdr, sd->quality); @@ -6931,7 +6928,6 @@ static void sd_stop0(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; - kfree(sd->jpeg_hdr); if (!gspca_dev->present) return; send_unknown(gspca_dev->dev, sd->sensor); |