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/video/stv680.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/video/stv680.c')
-rw-r--r-- | drivers/media/video/stv680.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c index 42acc92c182d..0783b0a23f8a 100644 --- a/drivers/media/video/stv680.c +++ b/drivers/media/video/stv680.c | |||
@@ -1080,7 +1080,7 @@ static int stv680_newframe (struct usb_stv *stv680, int framenr) | |||
1080 | * Video4Linux | 1080 | * Video4Linux |
1081 | *********************************************************************/ | 1081 | *********************************************************************/ |
1082 | 1082 | ||
1083 | static int stv_open (struct inode *inode, struct file *file) | 1083 | static int stv_open(struct file *file) |
1084 | { | 1084 | { |
1085 | struct video_device *dev = video_devdata(file); | 1085 | struct video_device *dev = video_devdata(file); |
1086 | struct usb_stv *stv680 = video_get_drvdata(dev); | 1086 | struct usb_stv *stv680 = video_get_drvdata(dev); |
@@ -1106,7 +1106,7 @@ static int stv_open (struct inode *inode, struct file *file) | |||
1106 | return err; | 1106 | return err; |
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | static int stv_close (struct inode *inode, struct file *file) | 1109 | static int stv_close(struct file *file) |
1110 | { | 1110 | { |
1111 | struct video_device *dev = file->private_data; | 1111 | struct video_device *dev = file->private_data; |
1112 | struct usb_stv *stv680 = video_get_drvdata(dev); | 1112 | struct usb_stv *stv680 = video_get_drvdata(dev); |
@@ -1299,7 +1299,7 @@ static int stv680_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
1299 | return 0; | 1299 | return 0; |
1300 | } | 1300 | } |
1301 | 1301 | ||
1302 | static int stv680_ioctl(struct inode *inode, struct file *file, | 1302 | static int stv680_ioctl(struct file *file, |
1303 | unsigned int cmd, unsigned long arg) | 1303 | unsigned int cmd, unsigned long arg) |
1304 | { | 1304 | { |
1305 | return video_usercopy(file, cmd, arg, stv680_do_ioctl); | 1305 | return video_usercopy(file, cmd, arg, stv680_do_ioctl); |
@@ -1391,17 +1391,13 @@ static ssize_t stv680_read (struct file *file, char __user *buf, | |||
1391 | return realcount; | 1391 | return realcount; |
1392 | } /* stv680_read */ | 1392 | } /* stv680_read */ |
1393 | 1393 | ||
1394 | static const struct file_operations stv680_fops = { | 1394 | static const struct v4l2_file_operations stv680_fops = { |
1395 | .owner = THIS_MODULE, | 1395 | .owner = THIS_MODULE, |
1396 | .open = stv_open, | 1396 | .open = stv_open, |
1397 | .release = stv_close, | 1397 | .release = stv_close, |
1398 | .read = stv680_read, | 1398 | .read = stv680_read, |
1399 | .mmap = stv680_mmap, | 1399 | .mmap = stv680_mmap, |
1400 | .ioctl = stv680_ioctl, | 1400 | .ioctl = stv680_ioctl, |
1401 | #ifdef CONFIG_COMPAT | ||
1402 | .compat_ioctl = v4l_compat_ioctl32, | ||
1403 | #endif | ||
1404 | .llseek = no_llseek, | ||
1405 | }; | 1401 | }; |
1406 | static struct video_device stv680_template = { | 1402 | static struct video_device stv680_template = { |
1407 | .name = "STV0680 USB camera", | 1403 | .name = "STV0680 USB camera", |