X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fmedia%2Fradio%2Fradio-cadet.c;h=cb3075ac104c211c281af8c77660749735a8f7ad;hb=7b9a79bf4849fbf7389bd845052014b02d2b9bda;hp=265c4ea95502d536e51c914992ffcb980432aee6;hpb=ff699e6bd02eb1c6d02c7c2b576c2ee6caab201c;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c index 265c4ea..cb3075a 100644 --- a/drivers/media/radio/radio-cadet.c +++ b/drivers/media/radio/radio-cadet.c @@ -23,7 +23,7 @@ * 2002-01-17 Adam Belay * Updated to latest pnp code * - * 2003-01-31 Alan Cox + * 2003-01-31 Alan Cox * Cleaned up locking, delay code, general odds and ends * * 2006-07-30 Hans J. Koch @@ -39,6 +39,7 @@ #include /* copy to/from user */ #include /* V4L2 API defs */ #include +#include #include #include @@ -528,7 +529,7 @@ static int vidioc_s_audio(struct file *file, void *priv, } static int -cadet_open(struct inode *inode, struct file *file) +cadet_open(struct file *file) { users++; if (1 == users) init_waitqueue_head(&read_queue); @@ -536,7 +537,7 @@ cadet_open(struct inode *inode, struct file *file) } static int -cadet_release(struct inode *inode, struct file *file) +cadet_release(struct file *file) { users--; if (0 == users){ @@ -556,23 +557,16 @@ cadet_poll(struct file *file, struct poll_table_struct *wait) } -static const struct file_operations cadet_fops = { +static const struct v4l2_file_operations cadet_fops = { .owner = THIS_MODULE, .open = cadet_open, .release = cadet_release, .read = cadet_read, .ioctl = video_ioctl2, .poll = cadet_poll, - .compat_ioctl = v4l_compat_ioctl32, - .llseek = no_llseek, }; -static struct video_device cadet_radio= -{ - .owner = THIS_MODULE, - .name = "Cadet radio", - .type = VID_TYPE_TUNER, - .fops = &cadet_fops, +static const struct v4l2_ioctl_ops cadet_ioctl_ops = { .vidioc_querycap = vidioc_querycap, .vidioc_g_tuner = vidioc_g_tuner, .vidioc_s_tuner = vidioc_s_tuner, @@ -587,6 +581,13 @@ static struct video_device cadet_radio= .vidioc_s_input = vidioc_s_input, }; +static struct video_device cadet_radio = { + .name = "Cadet radio", + .fops = &cadet_fops, + .ioctl_ops = &cadet_ioctl_ops, + .release = video_device_release_empty, +}; + #ifdef CONFIG_PNP static struct pnp_device_id cadet_pnp_devices[] = { @@ -678,7 +679,7 @@ static int __init cadet_init(void) } if (!request_region(io,2,"cadet")) goto fail; - if(video_register_device(&cadet_radio,VFL_TYPE_RADIO,radio_nr)==-1) { + if (video_register_device(&cadet_radio, VFL_TYPE_RADIO, radio_nr) < 0) { release_region(io,2); goto fail; }