X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmedia%2Fradio%2Fradio-aztech.c;h=537f2f4795068daead6dff4b488f5347b9f6ba25;hb=1ffdddd6fa3d18982133f6d149d456312d8bfcac;hp=9bf25820169b64e6e093b2edc155de76a47e06ed;hpb=676b0ac7aa409d326d92ca46c65bba20bebb3c1c;p=linux-2.6 diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c index 9bf2582016..537f2f4795 100644 --- a/drivers/media/radio/radio-aztech.c +++ b/drivers/media/radio/radio-aztech.c @@ -33,6 +33,7 @@ #include /* copy to/from user */ #include /* kernel radio structs */ #include +#include #include /* for KERNEL_VERSION MACRO */ #define RADIO_VERSION KERNEL_VERSION(0,0,2) @@ -237,6 +238,20 @@ static int vidioc_g_audio (struct file *file, void *priv, return 0; } +static int vidioc_g_input(struct file *filp, void *priv, unsigned int *i) +{ + *i = 0; + return 0; +} + +static int vidioc_s_input(struct file *filp, void *priv, unsigned int i) +{ + if (i != 0) + return -EINVAL; + return 0; +} + + static int vidioc_s_audio (struct file *file, void *priv, struct v4l2_audio *a) { @@ -332,22 +347,20 @@ static const struct file_operations aztech_fops = { .open = video_exclusive_open, .release = video_exclusive_release, .ioctl = video_ioctl2, +#ifdef CONFIG_COMPAT .compat_ioctl = v4l_compat_ioctl32, +#endif .llseek = no_llseek, }; -static struct video_device aztech_radio= -{ - .owner = THIS_MODULE, - .name = "Aztech radio", - .type = VID_TYPE_TUNER, - .hardware = 0, - .fops = &aztech_fops, +static const struct v4l2_ioctl_ops aztech_ioctl_ops = { .vidioc_querycap = vidioc_querycap, .vidioc_g_tuner = vidioc_g_tuner, .vidioc_s_tuner = vidioc_s_tuner, .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_g_frequency = vidioc_g_frequency, .vidioc_s_frequency = vidioc_s_frequency, .vidioc_queryctrl = vidioc_queryctrl, @@ -355,6 +368,13 @@ static struct video_device aztech_radio= .vidioc_s_ctrl = vidioc_s_ctrl, }; +static struct video_device aztech_radio = { + .name = "Aztech radio", + .type = VID_TYPE_TUNER, + .fops = &aztech_fops, + .ioctl_ops = &aztech_ioctl_ops, +}; + module_param_named(debug,aztech_radio.debug, int, 0644); MODULE_PARM_DESC(debug,"activates debug info");