Commit 8f082946 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] tlg2300: remove ioctls that are invalid for radio devices

The input and audio ioctls are only valid for video/vbi nodes.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarHuang Shijie <shijie8@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 54dd0dde
...@@ -350,36 +350,9 @@ static int vidioc_s_tuner(struct file *file, void *priv, struct v4l2_tuner *vt) ...@@ -350,36 +350,9 @@ static int vidioc_s_tuner(struct file *file, void *priv, struct v4l2_tuner *vt)
{ {
return vt->index > 0 ? -EINVAL : 0; return vt->index > 0 ? -EINVAL : 0;
} }
static int vidioc_s_audio(struct file *file, void *priv, const struct v4l2_audio *va)
{
return (va->index != 0) ? -EINVAL : 0;
}
static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
{
a->index = 0;
a->mode = 0;
a->capability = V4L2_AUDCAP_STEREO;
strcpy(a->name, "Radio");
return 0;
}
static int vidioc_s_input(struct file *filp, void *priv, u32 i)
{
return (i != 0) ? -EINVAL : 0;
}
static int vidioc_g_input(struct file *filp, void *priv, u32 *i)
{
return (*i != 0) ? -EINVAL : 0;
}
static const struct v4l2_ioctl_ops poseidon_fm_ioctl_ops = { static const struct v4l2_ioctl_ops poseidon_fm_ioctl_ops = {
.vidioc_querycap = vidioc_querycap, .vidioc_querycap = vidioc_querycap,
.vidioc_g_audio = vidioc_g_audio,
.vidioc_s_audio = vidioc_s_audio,
.vidioc_g_input = vidioc_g_input,
.vidioc_s_input = vidioc_s_input,
.vidioc_queryctrl = tlg_fm_vidioc_queryctrl, .vidioc_queryctrl = tlg_fm_vidioc_queryctrl,
.vidioc_querymenu = tlg_fm_vidioc_querymenu, .vidioc_querymenu = tlg_fm_vidioc_querymenu,
.vidioc_g_ctrl = tlg_fm_vidioc_g_ctrl, .vidioc_g_ctrl = tlg_fm_vidioc_g_ctrl,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment