diff options
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-v4l2.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 49f5d3c3614c..cde5f5f3e8f2 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -738,16 +738,20 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, | |||
738 | break; | 738 | break; |
739 | } | 739 | } |
740 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 740 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
741 | case VIDIOC_INT_G_REGISTER: | 741 | case VIDIOC_DBG_S_REGISTER: |
742 | case VIDIOC_INT_S_REGISTER: | 742 | if (!capable(CAP_SYS_ADMIN)) { |
743 | ret = -EPERM; | ||
744 | break; | ||
745 | } /* fall through */ | ||
746 | case VIDIOC_DBG_G_REGISTER: | ||
743 | { | 747 | { |
744 | u32 val; | 748 | u32 val; |
745 | struct v4l2_register *req = (struct v4l2_register *)arg; | 749 | struct v4l2_register *req = (struct v4l2_register *)arg; |
746 | if (cmd == VIDIOC_INT_S_REGISTER) val = req->val; | 750 | if (cmd == VIDIOC_DBG_S_REGISTER) val = req->val; |
747 | ret = pvr2_hdw_register_access( | 751 | ret = pvr2_hdw_register_access( |
748 | hdw,req->i2c_id,req->reg, | 752 | hdw,req->i2c_id,req->reg, |
749 | cmd == VIDIOC_INT_S_REGISTER,&val); | 753 | cmd == VIDIOC_DBG_S_REGISTER,&val); |
750 | if (cmd == VIDIOC_INT_G_REGISTER) req->val = val; | 754 | if (cmd == VIDIOC_DBG_G_REGISTER) req->val = val; |
751 | break; | 755 | break; |
752 | } | 756 | } |
753 | #endif | 757 | #endif |