mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
V4L/DVB (7566): videobuf-dvb: allow its usage with videobuf-vmalloc
videobuf-dvb were still using a function that were videobuf-dma-sg dependent. This patch creates a generic handler for this function. This way, videobuf-dvb can now work with all videobuf implementations. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
3b5fa928a6
commit
59d3448995
6 changed files with 39 additions and 12 deletions
|
|
@ -13,6 +13,9 @@
|
|||
* the Free Software Foundation; either version 2
|
||||
*/
|
||||
|
||||
#ifndef _VIDEOBUF_CORE_H
|
||||
#define _VIDEOBUF_CORE_H
|
||||
|
||||
#include <linux/poll.h>
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
#include <linux/videodev.h>
|
||||
|
|
@ -123,7 +126,8 @@ struct videobuf_queue_ops {
|
|||
struct videobuf_qtype_ops {
|
||||
u32 magic;
|
||||
|
||||
void* (*alloc) (size_t size);
|
||||
void *(*alloc) (size_t size);
|
||||
void *(*vmalloc) (struct videobuf_buffer *buf);
|
||||
int (*iolock) (struct videobuf_queue* q,
|
||||
struct videobuf_buffer *vb,
|
||||
struct v4l2_framebuffer *fbuf);
|
||||
|
|
@ -185,6 +189,10 @@ int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb,
|
|||
|
||||
void *videobuf_alloc(struct videobuf_queue* q);
|
||||
|
||||
/* Used on videobuf-dvb */
|
||||
void *videobuf_queue_to_vmalloc (struct videobuf_queue* q,
|
||||
struct videobuf_buffer *buf);
|
||||
|
||||
void videobuf_queue_core_init(struct videobuf_queue *q,
|
||||
struct videobuf_queue_ops *ops,
|
||||
struct device *dev,
|
||||
|
|
@ -233,10 +241,4 @@ int videobuf_mmap_free(struct videobuf_queue *q);
|
|||
int videobuf_mmap_mapper(struct videobuf_queue *q,
|
||||
struct vm_area_struct *vma);
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* c-basic-offset: 8
|
||||
* End:
|
||||
*/
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2
|
||||
*/
|
||||
#ifndef _VIDEOBUF_VMALLOC_H
|
||||
#define _VIDEOBUF_VMALLOC_H
|
||||
|
||||
#include <media/videobuf-core.h>
|
||||
|
||||
|
|
@ -39,3 +41,5 @@ void videobuf_queue_vmalloc_init(struct videobuf_queue* q,
|
|||
void *videobuf_to_vmalloc (struct videobuf_buffer *buf);
|
||||
|
||||
void videobuf_vmalloc_free (struct videobuf_buffer *buf);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue