upstream: [media] vivi: queue_setup improvements
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 10 Feb 2014 11:08:47 +0000 (08:08 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:40 +0000 (11:54 +0900)
commit9255d0a5814e00309f8e0844f76e65403b34a2d9
tree47292a3759a2e33d15ac4efce514425ff067a8cd
parent7cbdcd2ff6cdea9700f36e323a09de5e60715ddb
upstream: [media] vivi: queue_setup improvements

Drop the vid_limit module option: there is really no need to limit this.
No other driver does that. If you try to allocate more buffers then vb2
will automatically reduce the number of buffers anyway.

Also add sanity checks if the size in the fmt argument is going to be
used and drop the code that checks against *nbuffers == 0: this can
never happen (the vb2 framework ensures that) and the code was wrong
anyway since *nbuffers should have been set to the minimum number of
required buffers which is 1 for this driver.

Since vivi is often used as a template driver it is good to have this
driver be as compliant as possible. This broken code was for example
copied to the s2255 driver (which is being fixed as well).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/vivi.c