summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sonixb.c
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2010-06-27 08:08:19 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 20:31:10 +0200
commitb192ca983746585e807259414f8d6f58cb28311f (patch)
tree8c95bdcebcf4217e3813d803ecf281af2d431e5f /drivers/media/video/gspca/sonixb.c
parentV4L/DVB: gspca - gl860: Fix a compilation warning (diff)
downloadlinux-b192ca983746585e807259414f8d6f58cb28311f.tar.xz
linux-b192ca983746585e807259414f8d6f58cb28311f.zip
V4L/DVB: gspca - main: Simplify image building
The image pointer and its length are now in the main structure instead of in the frame buffer. They are updated on application vidioc_qbuf and in the URB interrupt function when ending an image. 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/sonixb.c')
-rw-r--r--drivers/media/video/gspca/sonixb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c
index 95354a339e3d..4989a2c779e5 100644
--- a/drivers/media/video/gspca/sonixb.c
+++ b/drivers/media/video/gspca/sonixb.c
@@ -1251,16 +1251,14 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
if (cam->cam_mode[gspca_dev->curr_mode].priv & MODE_RAW) {
/* In raw mode we sometimes get some garbage after the frame
ignore this */
- struct gspca_frame *frame;
int used;
int size = cam->cam_mode[gspca_dev->curr_mode].sizeimage;
- frame = gspca_get_i_frame(gspca_dev);
- if (frame == NULL) {
+ if (gspca_dev->image == NULL) {
gspca_dev->last_packet_type = DISCARD_PACKET;
return;
}
- used = frame->data_end - frame->data;
+ used = gspca_dev->image_len;
if (used + len > size)
len = size - used;
}