Commit a4cf4cac authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 63e42485
......@@ -52,7 +52,7 @@ MODULE_LICENSE("GPL");
#define CALL(q, f, arg...) \
((q->int_ops->f) ? q->int_ops->f(arg) : 0)
void *videobuf_alloc(struct videobuf_queue *q)
struct videobuf_buffer *videobuf_alloc(struct videobuf_queue *q)
{
struct videobuf_buffer *vb;
......
......@@ -190,7 +190,7 @@ static int videobuf_dma_contig_user_get(struct videobuf_dma_contig_memory *mem,
return ret;
}
static void *__videobuf_alloc(size_t size)
static struct videobuf_buffer *__videobuf_alloc(size_t size)
{
struct videobuf_dma_contig_memory *mem;
struct videobuf_buffer *vb;
......
......@@ -439,7 +439,7 @@ static const struct vm_operations_struct videobuf_vm_ops = {
struct videobuf_dma_sg_memory
*/
static void *__videobuf_alloc(size_t size)
static struct videobuf_buffer *__videobuf_alloc(size_t size)
{
struct videobuf_dma_sg_memory *mem;
struct videobuf_buffer *vb;
......
......@@ -135,7 +135,7 @@ static const struct vm_operations_struct videobuf_vm_ops = {
struct videobuf_dma_sg_memory
*/
static void *__videobuf_alloc(size_t size)
static struct videobuf_buffer *__videobuf_alloc(size_t size)
{
struct videobuf_vmalloc_memory *mem;
struct videobuf_buffer *vb;
......
......@@ -127,7 +127,7 @@ struct videobuf_queue_ops {
struct videobuf_qtype_ops {
u32 magic;
void *(*alloc) (size_t size);
struct videobuf_buffer *(*alloc)(size_t size);
void *(*vmalloc) (struct videobuf_buffer *buf);
int (*iolock) (struct videobuf_queue *q,
struct videobuf_buffer *vb,
......@@ -182,7 +182,7 @@ int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr);
int videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb,
struct v4l2_framebuffer *fbuf);
void *videobuf_alloc(struct videobuf_queue* q);
struct videobuf_buffer *videobuf_alloc(struct videobuf_queue *q);
/* Used on videobuf-dvb */
void *videobuf_queue_to_vmalloc(struct videobuf_queue *q,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment