From: Stefan Ringel Date: Fri, 7 May 2010 15:29:04 +0000 (-0300) Subject: V4L/DVB: tm6000: bugfix image position X-Git-Tag: v2.6.35-rc1~480^2~2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=3c7c5e9e8903f201bdbc85bdffba47a2d1352e4c;p=~shefty%2Frdma-dev.git V4L/DVB: tm6000: bugfix image position bugfix incorrect image and line position in videobuffer Signed-off-by: Stefan Ringel Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 721d5a52948..7828030c4f3 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -225,8 +225,8 @@ static int copy_packet(struct urb *urb, u32 header, u8 **ptr, u8 *endp, * It should, instead, check if the user selected * entrelaced or non-entrelaced mode */ - pos= ((line<<1)+field)*linewidth + - block*TM6000_URB_MSG_LEN; + pos = ((line << 1) - field - 1) * linewidth + + block * TM6000_URB_MSG_LEN; /* Don't allow to write out of the buffer */ if (pos+TM6000_URB_MSG_LEN > (*buf)->vb.size) {