From: Laurent Pinchart Date: Fri, 19 Jun 2015 11:50:07 +0000 (-0300) Subject: [media] vb2: Don't WARN when v4l2_buffer.bytesused is 0 for multiplanar buffers X-Git-Tag: omap-for-v4.2/fixes-rc1^2~111^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77a3c6fd90c9;p=pandora-kernel.git [media] vb2: Don't WARN when v4l2_buffer.bytesused is 0 for multiplanar buffers Commit f61bf13b6a07 ("[media] vb2: add allow_zero_bytesused flag to the vb2_queue struct") added a WARN_ONCE to catch usage of a deprecated API using a zero value for v4l2_buffer.bytesused. However, the condition is checked incorrectly, as the v4L2_buffer bytesused field is supposed to be ignored for multiplanar buffers. This results in spurious warnings when using the multiplanar API. Fix it by checking v4l2_buffer.bytesused for uniplanar buffers and v4l2_plane.bytesused for multiplanar buffers. Fixes: f61bf13b6a07 ("[media] vb2: add allow_zero_bytesused flag to the vb2_queue struct") Signed-off-by: Laurent Pinchart Cc: stable@vger.kernel.org # for v4.0 Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed