From 11bbc1cadb638aaccb4764c6e16807b36b53cf19 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 16 May 2010 09:24:06 -0300 Subject: V4L/DVB: v4l2: hook up the new control framework into the core framework Add the calls needed to automatically merge subdev controls into a bridge control handler. Hook up the control framework in __video_ioctl2 and video_register_device. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/v4l2-dev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/media/video/v4l2-dev.c') diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 9e89bf617790..21ffd030611e 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c @@ -447,8 +447,12 @@ static int __video_register_device(struct video_device *vdev, int type, int nr, vdev->vfl_type = type; vdev->cdev = NULL; - if (vdev->v4l2_dev && vdev->v4l2_dev->dev) - vdev->parent = vdev->v4l2_dev->dev; + if (vdev->v4l2_dev) { + if (vdev->v4l2_dev->dev) + vdev->parent = vdev->v4l2_dev->dev; + if (vdev->ctrl_handler == NULL) + vdev->ctrl_handler = vdev->v4l2_dev->ctrl_handler; + } /* Part 2: find a free minor, device node number and device index. */ #ifdef CONFIG_VIDEO_FIXED_MINOR_RANGES -- cgit v1.2.3