[media] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

Replace the private struct vb2_dma_sg_desc with the struct sg_table so
we can benefit from all the helping functions in lib/scatterlist.c for
things like allocating the sg or compacting the descriptor.
marvel-ccic and solo6x10 drivers, that use this API have been updated.

Acked-by: Marek Szyprowski <[email protected]>
Reviewed-by: Andre Heider <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
[[email protected]: minor corrections of the changelog]
Signed-off-by: Sylwester Nawrocki <[email protected]>

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Ricardo Ribalda 2013-08-02 10:20:00 -03:00 • committed by Mauro Carvalho Chehab
commit 2230124759
4 changed files with 63 additions and 84 deletions

View file

@ -15,16 +15,10 @@
#include <media/videobuf2-core.h>
struct vb2_dma_sg_desc {
unsigned long size;
unsigned int num_pages;
struct scatterlist *sglist;
};
static inline struct vb2_dma_sg_desc *vb2_dma_sg_plane_desc(
static inline struct sg_table *vb2_dma_sg_plane_desc(
struct vb2_buffer *vb, unsigned int plane_no)
{
return (struct vb2_dma_sg_desc *)vb2_plane_cookie(vb, plane_no);
return (struct sg_table *)vb2_plane_cookie(vb, plane_no);
}
extern const struct vb2_mem_ops vb2_dma_sg_memops;