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/cx88/cx88-video.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/cx88/cx88-video.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index b96ce991d968..b93b7ab99d8c 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -757,9 +757,9 @@ static int get_ressource(struct cx8800_fh *fh) | |||
757 | } | 757 | } |
758 | } | 758 | } |
759 | 759 | ||
760 | static int video_open(struct inode *inode, struct file *file) | 760 | static int video_open(struct file *file) |
761 | { | 761 | { |
762 | int minor = iminor(inode); | 762 | int minor = video_devdata(file)->minor; |
763 | struct cx8800_dev *h,*dev = NULL; | 763 | struct cx8800_dev *h,*dev = NULL; |
764 | struct cx88_core *core; | 764 | struct cx88_core *core; |
765 | struct cx8800_fh *fh; | 765 | struct cx8800_fh *fh; |
@@ -904,7 +904,7 @@ video_poll(struct file *file, struct poll_table_struct *wait) | |||
904 | return 0; | 904 | return 0; |
905 | } | 905 | } |
906 | 906 | ||
907 | static int video_release(struct inode *inode, struct file *file) | 907 | static int video_release(struct file *file) |
908 | { | 908 | { |
909 | struct cx8800_fh *fh = file->private_data; | 909 | struct cx8800_fh *fh = file->private_data; |
910 | struct cx8800_dev *dev = fh->dev; | 910 | struct cx8800_dev *dev = fh->dev; |
@@ -1693,7 +1693,7 @@ static irqreturn_t cx8800_irq(int irq, void *dev_id) | |||
1693 | /* ----------------------------------------------------------- */ | 1693 | /* ----------------------------------------------------------- */ |
1694 | /* exported stuff */ | 1694 | /* exported stuff */ |
1695 | 1695 | ||
1696 | static const struct file_operations video_fops = | 1696 | static const struct v4l2_file_operations video_fops = |
1697 | { | 1697 | { |
1698 | .owner = THIS_MODULE, | 1698 | .owner = THIS_MODULE, |
1699 | .open = video_open, | 1699 | .open = video_open, |
@@ -1702,8 +1702,6 @@ static const struct file_operations video_fops = | |||
1702 | .poll = video_poll, | 1702 | .poll = video_poll, |
1703 | .mmap = video_mmap, | 1703 | .mmap = video_mmap, |
1704 | .ioctl = video_ioctl2, | 1704 | .ioctl = video_ioctl2, |
1705 | .compat_ioctl = v4l_compat_ioctl32, | ||
1706 | .llseek = no_llseek, | ||
1707 | }; | 1705 | }; |
1708 | 1706 | ||
1709 | static const struct v4l2_ioctl_ops video_ioctl_ops = { | 1707 | static const struct v4l2_ioctl_ops video_ioctl_ops = { |
@@ -1752,14 +1750,12 @@ static struct video_device cx8800_video_template = { | |||
1752 | .current_norm = V4L2_STD_NTSC_M, | 1750 | .current_norm = V4L2_STD_NTSC_M, |
1753 | }; | 1751 | }; |
1754 | 1752 | ||
1755 | static const struct file_operations radio_fops = | 1753 | static const struct v4l2_file_operations radio_fops = |
1756 | { | 1754 | { |
1757 | .owner = THIS_MODULE, | 1755 | .owner = THIS_MODULE, |
1758 | .open = video_open, | 1756 | .open = video_open, |
1759 | .release = video_release, | 1757 | .release = video_release, |
1760 | .ioctl = video_ioctl2, | 1758 | .ioctl = video_ioctl2, |
1761 | .compat_ioctl = v4l_compat_ioctl32, | ||
1762 | .llseek = no_llseek, | ||
1763 | }; | 1759 | }; |
1764 | 1760 | ||
1765 | static const struct v4l2_ioctl_ops radio_ioctl_ops = { | 1761 | static const struct v4l2_ioctl_ops radio_ioctl_ops = { |