aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-03-28 07:09:44 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:57:51 -0400
commita4cf4cac2979a828e7cd0a3cd02d7a5308a44a7f (patch)
treeb94943cd797a075ad96f9bb9310bae160aa67e39
parent63e424856b4ab0652c58f75a2d2ecb9c1f95db27 (diff)
V4L/DVB: v4l videobuf: use struct videobuf_buffer * instead of void * for videobuf_alloc
videobuf_alloc() returned a void *. Change to struct videobuf_buffer * to get better type checking. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/videobuf-core.c2
-rw-r--r--drivers/media/video/videobuf-dma-contig.c2
-rw-r--r--drivers/media/video/videobuf-dma-sg.c2
-rw-r--r--drivers/media/video/videobuf-vmalloc.c2
-rw-r--r--include/media/videobuf-core.h4
5 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index d76a7d500029..7b69f6b00a3d 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -52,7 +52,7 @@ MODULE_LICENSE("GPL");
52#define CALL(q, f, arg...) \ 52#define CALL(q, f, arg...) \
53 ((q->int_ops->f) ? q->int_ops->f(arg) : 0) 53 ((q->int_ops->f) ? q->int_ops->f(arg) : 0)
54 54
55void *videobuf_alloc(struct videobuf_queue *q) 55struct videobuf_buffer *videobuf_alloc(struct videobuf_queue *q)
56{ 56{
57 struct videobuf_buffer *vb; 57 struct videobuf_buffer *vb;
58 58
diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c
index 0a32cf810c88..76e158feca61 100644
--- a/drivers/media/video/videobuf-dma-contig.c
+++ b/drivers/media/video/videobuf-dma-contig.c
@@ -190,7 +190,7 @@ static int videobuf_dma_contig_user_get(struct videobuf_dma_contig_memory *mem,
190 return ret; 190 return ret;
191} 191}
192 192
193static void *__videobuf_alloc(size_t size) 193static struct videobuf_buffer *__videobuf_alloc(size_t size)
194{ 194{
195 struct videobuf_dma_contig_memory *mem; 195 struct videobuf_dma_contig_memory *mem;
196 struct videobuf_buffer *vb; 196 struct videobuf_buffer *vb;
diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
index 7ff275e30092..014eb63c0960 100644
--- a/drivers/media/video/videobuf-dma-sg.c
+++ b/drivers/media/video/videobuf-dma-sg.c
@@ -439,7 +439,7 @@ static const struct vm_operations_struct videobuf_vm_ops = {
439 struct videobuf_dma_sg_memory 439 struct videobuf_dma_sg_memory
440 */ 440 */
441 441
442static void *__videobuf_alloc(size_t size) 442static struct videobuf_buffer *__videobuf_alloc(size_t size)
443{ 443{
444 struct videobuf_dma_sg_memory *mem; 444 struct videobuf_dma_sg_memory *mem;
445 struct videobuf_buffer *vb; 445 struct videobuf_buffer *vb;
diff --git a/drivers/media/video/videobuf-vmalloc.c b/drivers/media/video/videobuf-vmalloc.c
index 43c92882e4c5..000a60fc456e 100644
--- a/drivers/media/video/videobuf-vmalloc.c
+++ b/drivers/media/video/videobuf-vmalloc.c
@@ -135,7 +135,7 @@ static const struct vm_operations_struct videobuf_vm_ops = {
135 struct videobuf_dma_sg_memory 135 struct videobuf_dma_sg_memory
136 */ 136 */
137 137
138static void *__videobuf_alloc(size_t size) 138static struct videobuf_buffer *__videobuf_alloc(size_t size)
139{ 139{
140 struct videobuf_vmalloc_memory *mem; 140 struct videobuf_vmalloc_memory *mem;
141 struct videobuf_buffer *vb; 141 struct videobuf_buffer *vb;
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h
index 22d5a02884ad..4497e23c9d29 100644
--- a/include/media/videobuf-core.h
+++ b/include/media/videobuf-core.h
@@ -127,7 +127,7 @@ struct videobuf_queue_ops {
127struct videobuf_qtype_ops { 127struct videobuf_qtype_ops {
128 u32 magic; 128 u32 magic;
129 129
130 void *(*alloc) (size_t size); 130 struct videobuf_buffer *(*alloc)(size_t size);
131 void *(*vmalloc) (struct videobuf_buffer *buf); 131 void *(*vmalloc) (struct videobuf_buffer *buf);
132 int (*iolock) (struct videobuf_queue *q, 132 int (*iolock) (struct videobuf_queue *q,
133 struct videobuf_buffer *vb, 133 struct videobuf_buffer *vb,
@@ -182,7 +182,7 @@ int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr);
182int videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb, 182int videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb,
183 struct v4l2_framebuffer *fbuf); 183 struct v4l2_framebuffer *fbuf);
184 184
185void *videobuf_alloc(struct videobuf_queue* q); 185struct videobuf_buffer *videobuf_alloc(struct videobuf_queue *q);
186 186
187/* Used on videobuf-dvb */ 187/* Used on videobuf-dvb */
188void *videobuf_queue_to_vmalloc(struct videobuf_queue *q, 188void *videobuf_queue_to_vmalloc(struct videobuf_queue *q,