diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-01-24 12:41:10 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-01-24 12:41:10 -0500 |
commit | 49c6ad430d74fb7995990be0f66165e4b94a6bc5 (patch) | |
tree | 9a0b4d5158cea625efd1f4185cdea79fe9f10d85 /drivers/media/video/v4l2-ioctl.c | |
parent | 233d84c46c2253d13e10b42d88c14748fbb67a98 (diff) | |
parent | 1bae4ce27c9c90344f23c65ea6966c50ffeae2f5 (diff) |
Merge commit 'v2.6.38-rc2' into topic/misc
Diffstat (limited to 'drivers/media/video/v4l2-ioctl.c')
-rw-r--r-- | drivers/media/video/v4l2-ioctl.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index 7e47f15f350d..f51327ef6757 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
@@ -1659,20 +1659,24 @@ static long __video_do_ioctl(struct file *file, | |||
1659 | { | 1659 | { |
1660 | struct v4l2_dbg_register *p = arg; | 1660 | struct v4l2_dbg_register *p = arg; |
1661 | 1661 | ||
1662 | if (!capable(CAP_SYS_ADMIN)) | 1662 | if (ops->vidioc_g_register) { |
1663 | ret = -EPERM; | 1663 | if (!capable(CAP_SYS_ADMIN)) |
1664 | else if (ops->vidioc_g_register) | 1664 | ret = -EPERM; |
1665 | ret = ops->vidioc_g_register(file, fh, p); | 1665 | else |
1666 | ret = ops->vidioc_g_register(file, fh, p); | ||
1667 | } | ||
1666 | break; | 1668 | break; |
1667 | } | 1669 | } |
1668 | case VIDIOC_DBG_S_REGISTER: | 1670 | case VIDIOC_DBG_S_REGISTER: |
1669 | { | 1671 | { |
1670 | struct v4l2_dbg_register *p = arg; | 1672 | struct v4l2_dbg_register *p = arg; |
1671 | 1673 | ||
1672 | if (!capable(CAP_SYS_ADMIN)) | 1674 | if (ops->vidioc_s_register) { |
1673 | ret = -EPERM; | 1675 | if (!capable(CAP_SYS_ADMIN)) |
1674 | else if (ops->vidioc_s_register) | 1676 | ret = -EPERM; |
1675 | ret = ops->vidioc_s_register(file, fh, p); | 1677 | else |
1678 | ret = ops->vidioc_s_register(file, fh, p); | ||
1679 | } | ||
1676 | break; | 1680 | break; |
1677 | } | 1681 | } |
1678 | #endif | 1682 | #endif |