[media] vb2: add debugging code to check for unbalanced ops
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 29 Jan 2014 14:53:25 +0000 (11:53 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 11 Mar 2014 09:56:37 +0000 (06:56 -0300)
commitb5b4541eef8eac83f5c0d166d8e494f7c9fff202
treef4bc458dfff48a3bd2236f235fa3249c356e2db8
parent952c9ee2900de152c4999d94da5c4bd846ae52e8
[media] vb2: add debugging code to check for unbalanced ops

When a vb2_queue is freed check if all the mem_ops and queue ops were balanced.
So the number of calls to e.g. buf_finish has to match the number of calls to
buf_prepare, etc.

This code is only enabled if CONFIG_VIDEO_ADV_DEBUG is set.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/videobuf2-core.c
include/media/videobuf2-core.h