diff options
Diffstat (limited to 'drivers/media/video/v4l2-ioctl.c')
-rw-r--r-- | drivers/media/video/v4l2-ioctl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index a2e442ab8a5b..69e8c6ffcc49 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
@@ -1946,13 +1946,19 @@ static long __video_do_ioctl(struct file *file, | |||
1946 | case VIDIOC_S_HW_FREQ_SEEK: | 1946 | case VIDIOC_S_HW_FREQ_SEEK: |
1947 | { | 1947 | { |
1948 | struct v4l2_hw_freq_seek *p = arg; | 1948 | struct v4l2_hw_freq_seek *p = arg; |
1949 | enum v4l2_tuner_type type; | ||
1949 | 1950 | ||
1950 | if (!ops->vidioc_s_hw_freq_seek) | 1951 | if (!ops->vidioc_s_hw_freq_seek) |
1951 | break; | 1952 | break; |
1953 | type = (vfd->vfl_type == VFL_TYPE_RADIO) ? | ||
1954 | V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV; | ||
1952 | dbgarg(cmd, | 1955 | dbgarg(cmd, |
1953 | "tuner=%d, type=%d, seek_upward=%d, wrap_around=%d\n", | 1956 | "tuner=%u, type=%u, seek_upward=%u, wrap_around=%u, spacing=%u\n", |
1954 | p->tuner, p->type, p->seek_upward, p->wrap_around); | 1957 | p->tuner, p->type, p->seek_upward, p->wrap_around, p->spacing); |
1955 | ret = ops->vidioc_s_hw_freq_seek(file, fh, p); | 1958 | if (p->type != type) |
1959 | ret = -EINVAL; | ||
1960 | else | ||
1961 | ret = ops->vidioc_s_hw_freq_seek(file, fh, p); | ||
1956 | break; | 1962 | break; |
1957 | } | 1963 | } |
1958 | case VIDIOC_ENUM_FRAMESIZES: | 1964 | case VIDIOC_ENUM_FRAMESIZES: |