]> Pileus Git - ~andy/linux/blobdiff - drivers/media/video/v4l2-subdev.c
Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git...
[~andy/linux] / drivers / media / video / v4l2-subdev.c
index 6521cf87852ff221ed7bb356c9781a6673d489d3..65ade5f03c2ef56efa5331c58a44391caa30f2ac 100644 (file)
@@ -174,6 +174,25 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
 
        case VIDIOC_UNSUBSCRIBE_EVENT:
                return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg);
+
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+       case VIDIOC_DBG_G_REGISTER:
+       {
+               struct v4l2_dbg_register *p = arg;
+
+               if (!capable(CAP_SYS_ADMIN))
+                       return -EPERM;
+               return v4l2_subdev_call(sd, core, g_register, p);
+       }
+       case VIDIOC_DBG_S_REGISTER:
+       {
+               struct v4l2_dbg_register *p = arg;
+
+               if (!capable(CAP_SYS_ADMIN))
+                       return -EPERM;
+               return v4l2_subdev_call(sd, core, s_register, p);
+       }
+#endif
 #if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
        case VIDIOC_SUBDEV_G_FMT: {
                struct v4l2_subdev_format *format = arg;