From 856378592a1b9be61e28092caf5e87446bae4694 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 6 Sep 2009 13:54:00 +0300 Subject: v4l: warn when desired devnodenr is in use & add _no_warn function From: Hans Verkuil Warn when the desired device node number is already in use, except when the new video_register_device_no_warn function is called since in some use-cases that warning is not relevant. Priority: normal Signed-off-by: Hans Verkuil --- linux/include/media/v4l2-dev.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index 1cae97561..f813ae9c0 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -105,6 +105,10 @@ struct video_device Also note that vdev->minor is set to -1 if the registration failed. */ int __must_check video_register_device(struct video_device *vdev, int type, int nr); +/* Same as video_register_device, but no warning is issued if the desired + device node number was already in use. */ +int __must_check video_register_device_no_warn(struct video_device *vdev, int type, int nr); + /* Unregister video devices. Will do nothing if vdev == NULL or vdev->minor < 0. */ void video_unregister_device(struct video_device *vdev); -- cgit v1.2.3