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

V4L/DVB: v4l videobuf: rename .vmalloc to .vaddr

Rename the .vmalloc op in struct videobuf_qtype_ops to .vaddr. This op returns
the virtual kernel address of a buffer. vaddr is a lot less confusing than
vmalloc since this callback does do any allocations.
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a4cf4cac
...@@ -108,8 +108,8 @@ EXPORT_SYMBOL_GPL(videobuf_iolock); ...@@ -108,8 +108,8 @@ EXPORT_SYMBOL_GPL(videobuf_iolock);
void *videobuf_queue_to_vmalloc(struct videobuf_queue *q, void *videobuf_queue_to_vmalloc(struct videobuf_queue *q,
struct videobuf_buffer *buf) struct videobuf_buffer *buf)
{ {
if (q->int_ops->vmalloc) if (q->int_ops->vaddr)
return q->int_ops->vmalloc(buf); return q->int_ops->vaddr(buf);
else else
return NULL; return NULL;
} }
......
...@@ -204,7 +204,7 @@ static struct videobuf_buffer *__videobuf_alloc(size_t size) ...@@ -204,7 +204,7 @@ static struct videobuf_buffer *__videobuf_alloc(size_t size)
return vb; return vb;
} }
static void *__videobuf_to_vmalloc(struct videobuf_buffer *buf) static void *__videobuf_to_vaddr(struct videobuf_buffer *buf)
{ {
struct videobuf_dma_contig_memory *mem = buf->priv; struct videobuf_dma_contig_memory *mem = buf->priv;
...@@ -414,7 +414,7 @@ static struct videobuf_qtype_ops qops = { ...@@ -414,7 +414,7 @@ static struct videobuf_qtype_ops qops = {
.mmap_mapper = __videobuf_mmap_mapper, .mmap_mapper = __videobuf_mmap_mapper,
.video_copy_to_user = __videobuf_copy_to_user, .video_copy_to_user = __videobuf_copy_to_user,
.copy_stream = __videobuf_copy_stream, .copy_stream = __videobuf_copy_stream,
.vmalloc = __videobuf_to_vmalloc, .vaddr = __videobuf_to_vaddr,
}; };
void videobuf_queue_dma_contig_init(struct videobuf_queue *q, void videobuf_queue_dma_contig_init(struct videobuf_queue *q,
......
...@@ -460,7 +460,7 @@ static struct videobuf_buffer *__videobuf_alloc(size_t size) ...@@ -460,7 +460,7 @@ static struct videobuf_buffer *__videobuf_alloc(size_t size)
return vb; return vb;
} }
static void *__videobuf_to_vmalloc(struct videobuf_buffer *buf) static void *__videobuf_to_vaddr(struct videobuf_buffer *buf)
{ {
struct videobuf_dma_sg_memory *mem = buf->priv; struct videobuf_dma_sg_memory *mem = buf->priv;
BUG_ON(!mem); BUG_ON(!mem);
...@@ -700,7 +700,7 @@ static struct videobuf_qtype_ops sg_ops = { ...@@ -700,7 +700,7 @@ static struct videobuf_qtype_ops sg_ops = {
.mmap_mapper = __videobuf_mmap_mapper, .mmap_mapper = __videobuf_mmap_mapper,
.video_copy_to_user = __videobuf_copy_to_user, .video_copy_to_user = __videobuf_copy_to_user,
.copy_stream = __videobuf_copy_stream, .copy_stream = __videobuf_copy_stream,
.vmalloc = __videobuf_to_vmalloc, .vaddr = __videobuf_to_vaddr,
}; };
void *videobuf_sg_alloc(size_t size) void *videobuf_sg_alloc(size_t size)
......
...@@ -373,7 +373,7 @@ static struct videobuf_qtype_ops qops = { ...@@ -373,7 +373,7 @@ static struct videobuf_qtype_ops qops = {
.mmap_mapper = __videobuf_mmap_mapper, .mmap_mapper = __videobuf_mmap_mapper,
.video_copy_to_user = __videobuf_copy_to_user, .video_copy_to_user = __videobuf_copy_to_user,
.copy_stream = __videobuf_copy_stream, .copy_stream = __videobuf_copy_stream,
.vmalloc = videobuf_to_vmalloc, .vaddr = videobuf_to_vmalloc,
}; };
void videobuf_queue_vmalloc_init(struct videobuf_queue *q, void videobuf_queue_vmalloc_init(struct videobuf_queue *q,
......
...@@ -128,7 +128,7 @@ struct videobuf_qtype_ops { ...@@ -128,7 +128,7 @@ struct videobuf_qtype_ops {
u32 magic; u32 magic;
struct videobuf_buffer *(*alloc)(size_t size); struct videobuf_buffer *(*alloc)(size_t size);
void *(*vmalloc) (struct videobuf_buffer *buf); void *(*vaddr) (struct videobuf_buffer *buf);
int (*iolock) (struct videobuf_queue *q, int (*iolock) (struct videobuf_queue *q,
struct videobuf_buffer *vb, struct videobuf_buffer *vb,
struct v4l2_framebuffer *fbuf); struct v4l2_framebuffer *fbuf);
......
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