V4L/DVB (11323): pxa-camera: simplify the .buf_queue path by merging two loops
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 31 Mar 2009 06:44:22 +0000 (03:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 7 Apr 2009 00:43:46 +0000 (21:43 -0300)
commitae7410e712b33d32337df80f71f702d12a8ebb81
treec42fdc07d694d685b74ecc061d4b8080e392f78c
parent8c62e221c71a0240f16ea8aa29609f93a68c2ff9
V4L/DVB (11323): pxa-camera: simplify the .buf_queue path by merging two loops

pxa_dma_update_sg_tail() is called only once, runs exactly the same loop as the
caller and has to recalculate the last element in an sg-list, that the caller
has already calculated. Eliminate redundancy by merging the two loops and
re-using the calculated pointer. This also saves a bit of performance which is
always good during video-capture.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/pxa_camera.c