diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-04 08:44:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-04 08:44:16 -0400 |
commit | 695a461296e5df148c99ac087b9e1cb380f4db15 (patch) | |
tree | 951893036fdc0b7bae0e17bc739ac8ffe909781d /drivers/media/video/v4l2-ioctl.c | |
parent | c7084b35eb1a4d3353a501508baf9d3d82822c93 (diff) | |
parent | 2b681fafcc50fea6304ed418667c9d04282acb73 (diff) |
Merge branch 'amd-iommu/2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into core/iommu
Diffstat (limited to 'drivers/media/video/v4l2-ioctl.c')
-rw-r--r-- | drivers/media/video/v4l2-ioctl.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index be64a502ea27..f2afc4e08379 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
@@ -1081,8 +1081,10 @@ static long __video_do_ioctl(struct file *file, | |||
1081 | /* Calls the specific handler */ | 1081 | /* Calls the specific handler */ |
1082 | if (ops->vidioc_g_std) | 1082 | if (ops->vidioc_g_std) |
1083 | ret = ops->vidioc_g_std(file, fh, id); | 1083 | ret = ops->vidioc_g_std(file, fh, id); |
1084 | else | 1084 | else if (vfd->current_norm) |
1085 | *id = vfd->current_norm; | 1085 | *id = vfd->current_norm; |
1086 | else | ||
1087 | ret = -EINVAL; | ||
1086 | 1088 | ||
1087 | if (!ret) | 1089 | if (!ret) |
1088 | dbgarg(cmd, "std=0x%08Lx\n", (long long unsigned)*id); | 1090 | dbgarg(cmd, "std=0x%08Lx\n", (long long unsigned)*id); |
@@ -1553,12 +1555,19 @@ static long __video_do_ioctl(struct file *file, | |||
1553 | break; | 1555 | break; |
1554 | ret = ops->vidioc_g_parm(file, fh, p); | 1556 | ret = ops->vidioc_g_parm(file, fh, p); |
1555 | } else { | 1557 | } else { |
1558 | v4l2_std_id std = vfd->current_norm; | ||
1559 | |||
1556 | if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | 1560 | if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) |
1557 | return -EINVAL; | 1561 | return -EINVAL; |
1558 | 1562 | ||
1559 | v4l2_video_std_frame_period(vfd->current_norm, | ||
1560 | &p->parm.capture.timeperframe); | ||
1561 | ret = 0; | 1563 | ret = 0; |
1564 | if (ops->vidioc_g_std) | ||
1565 | ret = ops->vidioc_g_std(file, fh, &std); | ||
1566 | else if (std == 0) | ||
1567 | ret = -EINVAL; | ||
1568 | if (ret == 0) | ||
1569 | v4l2_video_std_frame_period(std, | ||
1570 | &p->parm.capture.timeperframe); | ||
1562 | } | 1571 | } |
1563 | 1572 | ||
1564 | dbgarg(cmd, "type=%d\n", p->type); | 1573 | dbgarg(cmd, "type=%d\n", p->type); |