aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-cadet.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-12-30 04:58:20 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-02 14:11:12 -0500
commitbec43661b1dc0075b7445223ba775674133b164d (patch)
tree2a09ad5cc78799985e5cfb789f0a23db58e70499 /drivers/media/radio/radio-cadet.c
parentdfa9a5ae679ff2d23caa995d0f55a19abaf0596e (diff)
V4L/DVB (10135): v4l2: introduce v4l2_file_operations.
Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/radio-cadet.c')
-rw-r--r--drivers/media/radio/radio-cadet.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c
index bfd37f38b9ab..cb3075ac104c 100644
--- a/drivers/media/radio/radio-cadet.c
+++ b/drivers/media/radio/radio-cadet.c
@@ -529,7 +529,7 @@ static int vidioc_s_audio(struct file *file, void *priv,
529} 529}
530 530
531static int 531static int
532cadet_open(struct inode *inode, struct file *file) 532cadet_open(struct file *file)
533{ 533{
534 users++; 534 users++;
535 if (1 == users) init_waitqueue_head(&read_queue); 535 if (1 == users) init_waitqueue_head(&read_queue);
@@ -537,7 +537,7 @@ cadet_open(struct inode *inode, struct file *file)
537} 537}
538 538
539static int 539static int
540cadet_release(struct inode *inode, struct file *file) 540cadet_release(struct file *file)
541{ 541{
542 users--; 542 users--;
543 if (0 == users){ 543 if (0 == users){
@@ -557,17 +557,13 @@ cadet_poll(struct file *file, struct poll_table_struct *wait)
557} 557}
558 558
559 559
560static const struct file_operations cadet_fops = { 560static const struct v4l2_file_operations cadet_fops = {
561 .owner = THIS_MODULE, 561 .owner = THIS_MODULE,
562 .open = cadet_open, 562 .open = cadet_open,
563 .release = cadet_release, 563 .release = cadet_release,
564 .read = cadet_read, 564 .read = cadet_read,
565 .ioctl = video_ioctl2, 565 .ioctl = video_ioctl2,
566 .poll = cadet_poll, 566 .poll = cadet_poll,
567#ifdef CONFIG_COMPAT
568 .compat_ioctl = v4l_compat_ioctl32,
569#endif
570 .llseek = no_llseek,
571}; 567};
572 568
573static const struct v4l2_ioctl_ops cadet_ioctl_ops = { 569static const struct v4l2_ioctl_ops cadet_ioctl_ops = {