]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l2-fh: add v4l2_fh_is_singular
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 8 Jan 2011 12:38:02 +0000 (09:38 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 22 Mar 2011 19:37:58 +0000 (16:37 -0300)
commit2c6993e479b2cb8adfac462a8a76279d140c48a1
tree7fd4bade365e394e38aee0764adca945a5bf394d
parent4329a22237d64f730ab74c2e21c06f075577de57
[media] v4l2-fh: add v4l2_fh_is_singular

Several drivers need to do something when the first filehandle is opened
or the last filehandle is closed. Most implement some use count mechanism,
but if they use v4l2_fh, then you can also just check if this is the only
filehandle for the device node. A simple helper function can do this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-fh.c
include/media/v4l2-fh.h