summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx18/cx18-queue.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-05-05 18:25:22 +0000
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-05-05 18:25:22 +0000
commit016a5fafc5978414611068f581382668cc52ee9c (patch)
tree94c697422b8ec88d25c793be771d1f443895f714 /linux/drivers/media/video/cx18/cx18-queue.c
parent8b21bbd63b7b73b55a57f2d8b1bf2aacd2f80874 (diff)
downloadmediapointer-dvb-s2-016a5fafc5978414611068f581382668cc52ee9c.tar.gz
mediapointer-dvb-s2-016a5fafc5978414611068f581382668cc52ee9c.tar.bz2
cx18/: possible cleanups
From: Adrian Bunk <bunk@kernel.org> 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 'linux/drivers/media/video/cx18/cx18-queue.c')
-rw-r--r--linux/drivers/media/video/cx18/cx18-queue.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/linux/drivers/media/video/cx18/cx18-queue.c b/linux/drivers/media/video/cx18/cx18-queue.c
index 4ef6996b2..6990b77c6 100644
--- a/linux/drivers/media/video/cx18/cx18-queue.c
+++ b/linux/drivers/media/video/cx18/cx18-queue.c
@@ -26,17 +26,6 @@
#include "cx18-queue.h"
#include "cx18-scb.h"
-int cx18_buf_copy_from_user(struct cx18_stream *s, struct cx18_buffer *buf,
- const char __user *src, int copybytes)
-{
- if (s->buf_size - buf->bytesused < copybytes)
- copybytes = s->buf_size - buf->bytesused;
- if (copy_from_user(buf->buf + buf->bytesused, src, copybytes))
- return -EFAULT;
- buf->bytesused += copybytes;
- return copybytes;
-}
-
void cx18_buf_swap(struct cx18_buffer *buf)
{
int i;
@@ -159,8 +148,9 @@ static void cx18_queue_move_buf(struct cx18_stream *s, struct cx18_queue *from,
-ENOMEM is returned if the buffers could not be obtained, 0 if all
buffers where obtained from the 'from' list and if non-zero then
the number of stolen buffers is returned. */
-int cx18_queue_move(struct cx18_stream *s, struct cx18_queue *from,
- struct cx18_queue *steal, struct cx18_queue *to, int needed_bytes)
+static int cx18_queue_move(struct cx18_stream *s, struct cx18_queue *from,
+ struct cx18_queue *steal, struct cx18_queue *to,
+ int needed_bytes)
{
unsigned long flags;
int rc = 0;