diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-05-05 17:25:22 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-05-14 01:54:09 -0400 |
commit | 50510993e0452e0941fd03f63aa08256dd9c7fdc (patch) | |
tree | 47a0a0e0f8f2229cabcd1627a5189520e6106af3 /drivers/media/video/cx18/cx18-queue.c | |
parent | 3f98387efa9333c5765d36e144c47c107d6ba64a (diff) |
V4L/DVB (7856): cx18/: possible cleanups
This patch contains the following possible cleanups:
- cx18-i2c.c should #include "cx18-i2c.h" for getting the prototypes of
it's global functions
- make the following needlessly global functions static:
- cx18-fileops.c:cx18_claim_stream()
- cx18-fileops.c:cx18_release_stream()
- cx18-queue.c:cx18_queue_move()
- remove the following unused functions:
- cx18-driver.c:cx18_waitq()
- cx18-queue.c:cx18_buf_copy_from_user()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx18/cx18-queue.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-queue.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/media/video/cx18/cx18-queue.c b/drivers/media/video/cx18/cx18-queue.c index 4ef6996b2048..6990b77c6200 100644 --- a/drivers/media/video/cx18/cx18-queue.c +++ b/drivers/media/video/cx18/cx18-queue.c | |||
@@ -26,17 +26,6 @@ | |||
26 | #include "cx18-queue.h" | 26 | #include "cx18-queue.h" |
27 | #include "cx18-scb.h" | 27 | #include "cx18-scb.h" |
28 | 28 | ||
29 | int cx18_buf_copy_from_user(struct cx18_stream *s, struct cx18_buffer *buf, | ||
30 | const char __user *src, int copybytes) | ||
31 | { | ||
32 | if (s->buf_size - buf->bytesused < copybytes) | ||
33 | copybytes = s->buf_size - buf->bytesused; | ||
34 | if (copy_from_user(buf->buf + buf->bytesused, src, copybytes)) | ||
35 | return -EFAULT; | ||
36 | buf->bytesused += copybytes; | ||
37 | return copybytes; | ||
38 | } | ||
39 | |||
40 | void cx18_buf_swap(struct cx18_buffer *buf) | 29 | void cx18_buf_swap(struct cx18_buffer *buf) |
41 | { | 30 | { |
42 | int i; | 31 | int i; |
@@ -159,8 +148,9 @@ static void cx18_queue_move_buf(struct cx18_stream *s, struct cx18_queue *from, | |||
159 | -ENOMEM is returned if the buffers could not be obtained, 0 if all | 148 | -ENOMEM is returned if the buffers could not be obtained, 0 if all |
160 | buffers where obtained from the 'from' list and if non-zero then | 149 | buffers where obtained from the 'from' list and if non-zero then |
161 | the number of stolen buffers is returned. */ | 150 | the number of stolen buffers is returned. */ |
162 | int cx18_queue_move(struct cx18_stream *s, struct cx18_queue *from, | 151 | static int cx18_queue_move(struct cx18_stream *s, struct cx18_queue *from, |
163 | struct cx18_queue *steal, struct cx18_queue *to, int needed_bytes) | 152 | struct cx18_queue *steal, struct cx18_queue *to, |
153 | int needed_bytes) | ||
164 | { | 154 | { |
165 | unsigned long flags; | 155 | unsigned long flags; |
166 | int rc = 0; | 156 | int rc = 0; |