V4L/DVB: V4L2: Replace loops for finding max buffers in VIDIOC_REQBUFS callbacks
authorAndreas Bombe <aeb@debian.org>
Sun, 21 Mar 2010 19:02:45 +0000 (16:02 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 May 2010 15:57:13 +0000 (12:57 -0300)
commitdab7e3106ddd6cbc3b55301228407b9d17ce7773
tree1b6caa87522844e7ea8cc01932365201271f1afd
parent0a062033f727dc041691bfd768f4cf0598f559a1
V4L/DVB: V4L2: Replace loops for finding max buffers in VIDIOC_REQBUFS callbacks

Due to obvious copy and paste coding a number of video capture drivers
which implement a limit on the buffer memory decremented the user
supplied buffer count in a while loop until it reaches an acceptable
value.

This is a silly thing to do when the maximum value can be directly
computed.

Signed-off-by: Andreas Bombe <aeb@debian.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/cx23885/cx23885-video.c
drivers/media/video/cx88/cx88-video.c
drivers/media/video/mx1_camera.c
drivers/media/video/omap24xxcam.c
drivers/media/video/pxa_camera.c
drivers/media/video/s2255drv.c
drivers/media/video/sh_mobile_ceu_camera.c
drivers/media/video/vivi.c
drivers/media/video/zr364xx.c
drivers/staging/cx25821/cx25821-video.c