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/c-qcam.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/c-qcam.c')
-rw-r--r-- | drivers/media/video/c-qcam.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c index 21c71eb085db..837c16df1f51 100644 --- a/drivers/media/video/c-qcam.c +++ b/drivers/media/video/c-qcam.c | |||
@@ -665,7 +665,7 @@ static int qcam_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
665 | return 0; | 665 | return 0; |
666 | } | 666 | } |
667 | 667 | ||
668 | static int qcam_ioctl(struct inode *inode, struct file *file, | 668 | static int qcam_ioctl(struct file *file, |
669 | unsigned int cmd, unsigned long arg) | 669 | unsigned int cmd, unsigned long arg) |
670 | { | 670 | { |
671 | return video_usercopy(file, cmd, arg, qcam_do_ioctl); | 671 | return video_usercopy(file, cmd, arg, qcam_do_ioctl); |
@@ -687,7 +687,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf, | |||
687 | return len; | 687 | return len; |
688 | } | 688 | } |
689 | 689 | ||
690 | static int qcam_exclusive_open(struct inode *inode, struct file *file) | 690 | static int qcam_exclusive_open(struct file *file) |
691 | { | 691 | { |
692 | struct video_device *dev = video_devdata(file); | 692 | struct video_device *dev = video_devdata(file); |
693 | struct qcam_device *qcam = (struct qcam_device *)dev; | 693 | struct qcam_device *qcam = (struct qcam_device *)dev; |
@@ -695,7 +695,7 @@ static int qcam_exclusive_open(struct inode *inode, struct file *file) | |||
695 | return test_and_set_bit(0, &qcam->in_use) ? -EBUSY : 0; | 695 | return test_and_set_bit(0, &qcam->in_use) ? -EBUSY : 0; |
696 | } | 696 | } |
697 | 697 | ||
698 | static int qcam_exclusive_release(struct inode *inode, struct file *file) | 698 | static int qcam_exclusive_release(struct file *file) |
699 | { | 699 | { |
700 | struct video_device *dev = video_devdata(file); | 700 | struct video_device *dev = video_devdata(file); |
701 | struct qcam_device *qcam = (struct qcam_device *)dev; | 701 | struct qcam_device *qcam = (struct qcam_device *)dev; |
@@ -705,16 +705,12 @@ static int qcam_exclusive_release(struct inode *inode, struct file *file) | |||
705 | } | 705 | } |
706 | 706 | ||
707 | /* video device template */ | 707 | /* video device template */ |
708 | static const struct file_operations qcam_fops = { | 708 | static const struct v4l2_file_operations qcam_fops = { |
709 | .owner = THIS_MODULE, | 709 | .owner = THIS_MODULE, |
710 | .open = qcam_exclusive_open, | 710 | .open = qcam_exclusive_open, |
711 | .release = qcam_exclusive_release, | 711 | .release = qcam_exclusive_release, |
712 | .ioctl = qcam_ioctl, | 712 | .ioctl = qcam_ioctl, |
713 | #ifdef CONFIG_COMPAT | ||
714 | .compat_ioctl = v4l_compat_ioctl32, | ||
715 | #endif | ||
716 | .read = qcam_read, | 713 | .read = qcam_read, |
717 | .llseek = no_llseek, | ||
718 | }; | 714 | }; |
719 | 715 | ||
720 | static struct video_device qcam_template= | 716 | static struct video_device qcam_template= |