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/uvc | |
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/uvc')
-rw-r--r-- | drivers/media/video/uvc/uvc_v4l2.c | 10 | ||||
-rw-r--r-- | drivers/media/video/uvc/uvcvideo.h | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index afcc6934559e..df9e937626ef 100644 --- a/drivers/media/video/uvc/uvc_v4l2.c +++ b/drivers/media/video/uvc/uvc_v4l2.c | |||
@@ -406,7 +406,7 @@ static int uvc_has_privileges(struct uvc_fh *handle) | |||
406 | * V4L2 file operations | 406 | * V4L2 file operations |
407 | */ | 407 | */ |
408 | 408 | ||
409 | static int uvc_v4l2_open(struct inode *inode, struct file *file) | 409 | static int uvc_v4l2_open(struct file *file) |
410 | { | 410 | { |
411 | struct uvc_video_device *video; | 411 | struct uvc_video_device *video; |
412 | struct uvc_fh *handle; | 412 | struct uvc_fh *handle; |
@@ -444,7 +444,7 @@ done: | |||
444 | return ret; | 444 | return ret; |
445 | } | 445 | } |
446 | 446 | ||
447 | static int uvc_v4l2_release(struct inode *inode, struct file *file) | 447 | static int uvc_v4l2_release(struct file *file) |
448 | { | 448 | { |
449 | struct uvc_video_device *video = video_drvdata(file); | 449 | struct uvc_video_device *video = video_drvdata(file); |
450 | struct uvc_fh *handle = (struct uvc_fh *)file->private_data; | 450 | struct uvc_fh *handle = (struct uvc_fh *)file->private_data; |
@@ -996,7 +996,7 @@ static int uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
996 | return ret; | 996 | return ret; |
997 | } | 997 | } |
998 | 998 | ||
999 | static int uvc_v4l2_ioctl(struct inode *inode, struct file *file, | 999 | static int uvc_v4l2_ioctl(struct file *file, |
1000 | unsigned int cmd, unsigned long arg) | 1000 | unsigned int cmd, unsigned long arg) |
1001 | { | 1001 | { |
1002 | if (uvc_trace_param & UVC_TRACE_IOCTL) { | 1002 | if (uvc_trace_param & UVC_TRACE_IOCTL) { |
@@ -1097,13 +1097,11 @@ static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait) | |||
1097 | return uvc_queue_poll(&video->queue, file, wait); | 1097 | return uvc_queue_poll(&video->queue, file, wait); |
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | struct file_operations uvc_fops = { | 1100 | const struct v4l2_file_operations uvc_fops = { |
1101 | .owner = THIS_MODULE, | 1101 | .owner = THIS_MODULE, |
1102 | .open = uvc_v4l2_open, | 1102 | .open = uvc_v4l2_open, |
1103 | .release = uvc_v4l2_release, | 1103 | .release = uvc_v4l2_release, |
1104 | .ioctl = uvc_v4l2_ioctl, | 1104 | .ioctl = uvc_v4l2_ioctl, |
1105 | .compat_ioctl = v4l_compat_ioctl32, | ||
1106 | .llseek = no_llseek, | ||
1107 | .read = uvc_v4l2_read, | 1105 | .read = uvc_v4l2_read, |
1108 | .mmap = uvc_v4l2_mmap, | 1106 | .mmap = uvc_v4l2_mmap, |
1109 | .poll = uvc_v4l2_poll, | 1107 | .poll = uvc_v4l2_poll, |
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index 896b791ece15..bcf4361dc1bc 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h | |||
@@ -753,7 +753,7 @@ static inline int uvc_queue_streaming(struct uvc_video_queue *queue) | |||
753 | } | 753 | } |
754 | 754 | ||
755 | /* V4L2 interface */ | 755 | /* V4L2 interface */ |
756 | extern struct file_operations uvc_fops; | 756 | extern const struct v4l2_file_operations uvc_fops; |
757 | 757 | ||
758 | /* Video */ | 758 | /* Video */ |
759 | extern int uvc_video_init(struct uvc_video_device *video); | 759 | extern int uvc_video_init(struct uvc_video_device *video); |