diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-02 15:42:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-02 15:42:59 -0400 |
commit | f76bd108e5031202bb40849306f98c4afebe4ef6 (patch) | |
tree | 455e14a23642a82513eebd4e4f7d3b76842869cd /drivers/media/video/v4l2-ioctl.c | |
parent | cd6feeeafddbef6abfe4d90fb26e42fd844d34ed (diff) | |
parent | eced1dfcfcf6b0a35e925d73916a9d8e36ab5457 (diff) |
Merge branch 'perfcounters/urgent' into perfcounters/core
Merge reason: We are going to modify a place modified by
perfcounters/urgent.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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); |