[media] media: vb2: return for polling if a buffer is available
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 21 May 2013 02:47:29 +0000 (23:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 3 Jun 2013 18:30:30 +0000 (15:30 -0300)
commit412cb87d28a1f299ee82fe1c8bfe6cbeec9a4655
treec1500573ff40e079f44966edc1b83439b05e3a35
parente9d98ddc0a4e4e11603c818bf234644031bff384
[media] media: vb2: return for polling if a buffer is available

The vb2_poll() does not need to wait next vb_buffer_done() if there is already
a buffer in done_list of queue, but current vb2_poll() always waits.
So done_list is checked before calling poll_wait().

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/v4l2-core/videobuf2-core.c