diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-12-30 04:58:20 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-02 14:11:12 -0500 |
commit | bec43661b1dc0075b7445223ba775674133b164d (patch) | |
tree | 2a09ad5cc78799985e5cfb789f0a23db58e70499 /drivers/media/radio/radio-mr800.c | |
parent | dfa9a5ae679ff2d23caa995d0f55a19abaf0596e (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-mr800.c')
-rw-r--r-- | drivers/media/radio/radio-mr800.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index e730eddb2bb5..0747dc8862b0 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c | |||
@@ -127,8 +127,8 @@ static struct v4l2_queryctrl radio_qctrl[] = { | |||
127 | static int usb_amradio_probe(struct usb_interface *intf, | 127 | static int usb_amradio_probe(struct usb_interface *intf, |
128 | const struct usb_device_id *id); | 128 | const struct usb_device_id *id); |
129 | static void usb_amradio_disconnect(struct usb_interface *intf); | 129 | static void usb_amradio_disconnect(struct usb_interface *intf); |
130 | static int usb_amradio_open(struct inode *inode, struct file *file); | 130 | static int usb_amradio_open(struct file *file); |
131 | static int usb_amradio_close(struct inode *inode, struct file *file); | 131 | static int usb_amradio_close(struct file *file); |
132 | static int usb_amradio_suspend(struct usb_interface *intf, | 132 | static int usb_amradio_suspend(struct usb_interface *intf, |
133 | pm_message_t message); | 133 | pm_message_t message); |
134 | static int usb_amradio_resume(struct usb_interface *intf); | 134 | static int usb_amradio_resume(struct usb_interface *intf); |
@@ -500,7 +500,7 @@ static int vidioc_s_input(struct file *filp, void *priv, unsigned int i) | |||
500 | } | 500 | } |
501 | 501 | ||
502 | /* open device - amradio_start() and amradio_setfreq() */ | 502 | /* open device - amradio_start() and amradio_setfreq() */ |
503 | static int usb_amradio_open(struct inode *inode, struct file *file) | 503 | static int usb_amradio_open(struct file *file) |
504 | { | 504 | { |
505 | struct amradio_device *radio = video_get_drvdata(video_devdata(file)); | 505 | struct amradio_device *radio = video_get_drvdata(video_devdata(file)); |
506 | 506 | ||
@@ -525,7 +525,7 @@ static int usb_amradio_open(struct inode *inode, struct file *file) | |||
525 | } | 525 | } |
526 | 526 | ||
527 | /*close device */ | 527 | /*close device */ |
528 | static int usb_amradio_close(struct inode *inode, struct file *file) | 528 | static int usb_amradio_close(struct file *file) |
529 | { | 529 | { |
530 | struct amradio_device *radio = video_get_drvdata(video_devdata(file)); | 530 | struct amradio_device *radio = video_get_drvdata(video_devdata(file)); |
531 | int retval; | 531 | int retval; |
@@ -572,15 +572,11 @@ static int usb_amradio_resume(struct usb_interface *intf) | |||
572 | } | 572 | } |
573 | 573 | ||
574 | /* File system interface */ | 574 | /* File system interface */ |
575 | static const struct file_operations usb_amradio_fops = { | 575 | static const struct v4l2_file_operations usb_amradio_fops = { |
576 | .owner = THIS_MODULE, | 576 | .owner = THIS_MODULE, |
577 | .open = usb_amradio_open, | 577 | .open = usb_amradio_open, |
578 | .release = usb_amradio_close, | 578 | .release = usb_amradio_close, |
579 | .ioctl = video_ioctl2, | 579 | .ioctl = video_ioctl2, |
580 | #ifdef CONFIG_COMPAT | ||
581 | .compat_ioctl = v4l_compat_ioctl32, | ||
582 | #endif | ||
583 | .llseek = no_llseek, | ||
584 | }; | 580 | }; |
585 | 581 | ||
586 | static const struct v4l2_ioctl_ops usb_amradio_ioctl_ops = { | 582 | static const struct v4l2_ioctl_ops usb_amradio_ioctl_ops = { |