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/cpia2/cpia2_v4l.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/cpia2/cpia2_v4l.c')
-rw-r--r-- | drivers/media/video/cpia2/cpia2_v4l.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c index 3c2d7eac1197..91870cc9c445 100644 --- a/drivers/media/video/cpia2/cpia2_v4l.c +++ b/drivers/media/video/cpia2/cpia2_v4l.c | |||
@@ -239,7 +239,7 @@ static struct v4l2_queryctrl controls[] = { | |||
239 | * cpia2_open | 239 | * cpia2_open |
240 | * | 240 | * |
241 | *****************************************************************************/ | 241 | *****************************************************************************/ |
242 | static int cpia2_open(struct inode *inode, struct file *file) | 242 | static int cpia2_open(struct file *file) |
243 | { | 243 | { |
244 | struct camera_data *cam = video_drvdata(file); | 244 | struct camera_data *cam = video_drvdata(file); |
245 | int retval = 0; | 245 | int retval = 0; |
@@ -302,7 +302,7 @@ err_return: | |||
302 | * cpia2_close | 302 | * cpia2_close |
303 | * | 303 | * |
304 | *****************************************************************************/ | 304 | *****************************************************************************/ |
305 | static int cpia2_close(struct inode *inode, struct file *file) | 305 | static int cpia2_close(struct file *file) |
306 | { | 306 | { |
307 | struct video_device *dev = video_devdata(file); | 307 | struct video_device *dev = video_devdata(file); |
308 | struct camera_data *cam = video_get_drvdata(dev); | 308 | struct camera_data *cam = video_get_drvdata(dev); |
@@ -1841,7 +1841,7 @@ static int cpia2_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
1841 | return retval; | 1841 | return retval; |
1842 | } | 1842 | } |
1843 | 1843 | ||
1844 | static int cpia2_ioctl(struct inode *inode, struct file *file, | 1844 | static int cpia2_ioctl(struct file *file, |
1845 | unsigned int cmd, unsigned long arg) | 1845 | unsigned int cmd, unsigned long arg) |
1846 | { | 1846 | { |
1847 | return video_usercopy(file, cmd, arg, cpia2_do_ioctl); | 1847 | return video_usercopy(file, cmd, arg, cpia2_do_ioctl); |
@@ -1912,17 +1912,13 @@ static void reset_camera_struct_v4l(struct camera_data *cam) | |||
1912 | /*** | 1912 | /*** |
1913 | * The v4l video device structure initialized for this device | 1913 | * The v4l video device structure initialized for this device |
1914 | ***/ | 1914 | ***/ |
1915 | static const struct file_operations fops_template = { | 1915 | static const struct v4l2_file_operations fops_template = { |
1916 | .owner = THIS_MODULE, | 1916 | .owner = THIS_MODULE, |
1917 | .open = cpia2_open, | 1917 | .open = cpia2_open, |
1918 | .release = cpia2_close, | 1918 | .release = cpia2_close, |
1919 | .read = cpia2_v4l_read, | 1919 | .read = cpia2_v4l_read, |
1920 | .poll = cpia2_v4l_poll, | 1920 | .poll = cpia2_v4l_poll, |
1921 | .ioctl = cpia2_ioctl, | 1921 | .ioctl = cpia2_ioctl, |
1922 | .llseek = no_llseek, | ||
1923 | #ifdef CONFIG_COMPAT | ||
1924 | .compat_ioctl = v4l_compat_ioctl32, | ||
1925 | #endif | ||
1926 | .mmap = cpia2_mmap, | 1922 | .mmap = cpia2_mmap, |
1927 | }; | 1923 | }; |
1928 | 1924 | ||