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/zc0301 | |
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/zc0301')
-rw-r--r-- | drivers/media/video/zc0301/zc0301_core.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c index 9d00e6056491..46590f63f0eb 100644 --- a/drivers/media/video/zc0301/zc0301_core.c +++ b/drivers/media/video/zc0301/zc0301_core.c | |||
@@ -649,7 +649,7 @@ static void zc0301_release_resources(struct kref *kref) | |||
649 | } | 649 | } |
650 | 650 | ||
651 | 651 | ||
652 | static int zc0301_open(struct inode* inode, struct file* filp) | 652 | static int zc0301_open(struct file *filp) |
653 | { | 653 | { |
654 | struct zc0301_device* cam; | 654 | struct zc0301_device* cam; |
655 | int err = 0; | 655 | int err = 0; |
@@ -733,7 +733,7 @@ out: | |||
733 | } | 733 | } |
734 | 734 | ||
735 | 735 | ||
736 | static int zc0301_release(struct inode* inode, struct file* filp) | 736 | static int zc0301_release(struct file *filp) |
737 | { | 737 | { |
738 | struct zc0301_device* cam; | 738 | struct zc0301_device* cam; |
739 | 739 | ||
@@ -1793,8 +1793,8 @@ zc0301_vidioc_s_parm(struct zc0301_device* cam, void __user * arg) | |||
1793 | } | 1793 | } |
1794 | 1794 | ||
1795 | 1795 | ||
1796 | static int zc0301_ioctl_v4l2(struct inode* inode, struct file* filp, | 1796 | static int zc0301_ioctl_v4l2(struct file *filp, |
1797 | unsigned int cmd, void __user * arg) | 1797 | unsigned int cmd, void __user *arg) |
1798 | { | 1798 | { |
1799 | struct zc0301_device *cam = video_drvdata(filp); | 1799 | struct zc0301_device *cam = video_drvdata(filp); |
1800 | 1800 | ||
@@ -1888,7 +1888,7 @@ static int zc0301_ioctl_v4l2(struct inode* inode, struct file* filp, | |||
1888 | } | 1888 | } |
1889 | 1889 | ||
1890 | 1890 | ||
1891 | static int zc0301_ioctl(struct inode* inode, struct file* filp, | 1891 | static int zc0301_ioctl(struct file *filp, |
1892 | unsigned int cmd, unsigned long arg) | 1892 | unsigned int cmd, unsigned long arg) |
1893 | { | 1893 | { |
1894 | struct zc0301_device *cam = video_drvdata(filp); | 1894 | struct zc0301_device *cam = video_drvdata(filp); |
@@ -1912,7 +1912,7 @@ static int zc0301_ioctl(struct inode* inode, struct file* filp, | |||
1912 | 1912 | ||
1913 | V4LDBG(3, "zc0301", cmd); | 1913 | V4LDBG(3, "zc0301", cmd); |
1914 | 1914 | ||
1915 | err = zc0301_ioctl_v4l2(inode, filp, cmd, (void __user *)arg); | 1915 | err = zc0301_ioctl_v4l2(filp, cmd, (void __user *)arg); |
1916 | 1916 | ||
1917 | mutex_unlock(&cam->fileop_mutex); | 1917 | mutex_unlock(&cam->fileop_mutex); |
1918 | 1918 | ||
@@ -1920,18 +1920,14 @@ static int zc0301_ioctl(struct inode* inode, struct file* filp, | |||
1920 | } | 1920 | } |
1921 | 1921 | ||
1922 | 1922 | ||
1923 | static const struct file_operations zc0301_fops = { | 1923 | static const struct v4l2_file_operations zc0301_fops = { |
1924 | .owner = THIS_MODULE, | 1924 | .owner = THIS_MODULE, |
1925 | .open = zc0301_open, | 1925 | .open = zc0301_open, |
1926 | .release = zc0301_release, | 1926 | .release = zc0301_release, |
1927 | .ioctl = zc0301_ioctl, | 1927 | .ioctl = zc0301_ioctl, |
1928 | #ifdef CONFIG_COMPAT | ||
1929 | .compat_ioctl = v4l_compat_ioctl32, | ||
1930 | #endif | ||
1931 | .read = zc0301_read, | 1928 | .read = zc0301_read, |
1932 | .poll = zc0301_poll, | 1929 | .poll = zc0301_poll, |
1933 | .mmap = zc0301_mmap, | 1930 | .mmap = zc0301_mmap, |
1934 | .llseek = no_llseek, | ||
1935 | }; | 1931 | }; |
1936 | 1932 | ||
1937 | /*****************************************************************************/ | 1933 | /*****************************************************************************/ |