aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bw-qcam.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/video/bw-qcam.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/video/bw-qcam.c')
-rw-r--r--drivers/media/video/bw-qcam.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c
index 17f80d03f38e..0b02be57b99c 100644
--- a/drivers/media/video/bw-qcam.c
+++ b/drivers/media/video/bw-qcam.c
@@ -863,7 +863,7 @@ static int qcam_do_ioctl(struct file *file, unsigned int cmd, void *arg)
863 return 0; 863 return 0;
864} 864}
865 865
866static int qcam_ioctl(struct inode *inode, struct file *file, 866static int qcam_ioctl(struct file *file,
867 unsigned int cmd, unsigned long arg) 867 unsigned int cmd, unsigned long arg)
868{ 868{
869 return video_usercopy(file, cmd, arg, qcam_do_ioctl); 869 return video_usercopy(file, cmd, arg, qcam_do_ioctl);
@@ -893,7 +893,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf,
893 return len; 893 return len;
894} 894}
895 895
896static int qcam_exclusive_open(struct inode *inode, struct file *file) 896static int qcam_exclusive_open(struct file *file)
897{ 897{
898 struct video_device *dev = video_devdata(file); 898 struct video_device *dev = video_devdata(file);
899 struct qcam_device *qcam = (struct qcam_device *)dev; 899 struct qcam_device *qcam = (struct qcam_device *)dev;
@@ -901,7 +901,7 @@ static int qcam_exclusive_open(struct inode *inode, struct file *file)
901 return test_and_set_bit(0, &qcam->in_use) ? -EBUSY : 0; 901 return test_and_set_bit(0, &qcam->in_use) ? -EBUSY : 0;
902} 902}
903 903
904static int qcam_exclusive_release(struct inode *inode, struct file *file) 904static int qcam_exclusive_release(struct file *file)
905{ 905{
906 struct video_device *dev = video_devdata(file); 906 struct video_device *dev = video_devdata(file);
907 struct qcam_device *qcam = (struct qcam_device *)dev; 907 struct qcam_device *qcam = (struct qcam_device *)dev;
@@ -910,16 +910,12 @@ static int qcam_exclusive_release(struct inode *inode, struct file *file)
910 return 0; 910 return 0;
911} 911}
912 912
913static const struct file_operations qcam_fops = { 913static const struct v4l2_file_operations qcam_fops = {
914 .owner = THIS_MODULE, 914 .owner = THIS_MODULE,
915 .open = qcam_exclusive_open, 915 .open = qcam_exclusive_open,
916 .release = qcam_exclusive_release, 916 .release = qcam_exclusive_release,
917 .ioctl = qcam_ioctl, 917 .ioctl = qcam_ioctl,
918#ifdef CONFIG_COMPAT
919 .compat_ioctl = v4l_compat_ioctl32,
920#endif
921 .read = qcam_read, 918 .read = qcam_read,
922 .llseek = no_llseek,
923}; 919};
924static struct video_device qcam_template= 920static struct video_device qcam_template=
925{ 921{