Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202044
b: refs/heads/master
c: 7181772
h: refs/heads/master
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Aug 2, 2010
1 parent f951f78 commit 7338c6b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fecfedeb27ab9497cbdd2c6fb7972082a7ed9263
refs/heads/master: 7181772d8915e6025ee4f2f6c5b16064689646f0
18 changes: 14 additions & 4 deletions trunk/drivers/media/video/videobuf-dma-sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ MODULE_LICENSE("GPL");

/* --------------------------------------------------------------------- */

struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages)
/*
* Return a scatterlist for some page-aligned vmalloc()'ed memory
* block (NULL on errors). Memory for the scatterlist is allocated
* using kmalloc. The caller must free the memory.
*/
static struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt,
int nr_pages)
{
struct scatterlist *sglist;
struct page *pg;
Expand All @@ -81,10 +87,14 @@ struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages)
vfree(sglist);
return NULL;
}
EXPORT_SYMBOL_GPL(videobuf_vmalloc_to_sg);

struct scatterlist *videobuf_pages_to_sg(struct page **pages, int nr_pages,
int offset)
/*
* Return a scatterlist for a an array of userpages (NULL on errors).
* Memory for the scatterlist is allocated using kmalloc. The caller
* must free the memory.
*/
static struct scatterlist *videobuf_pages_to_sg(struct page **pages,
int nr_pages, int offset)
{
struct scatterlist *sglist;
int i;
Expand Down
17 changes: 0 additions & 17 deletions trunk/include/media/videobuf-dma-sg.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,6 @@

/* --------------------------------------------------------------------- */

/*
* Return a scatterlist for some page-aligned vmalloc()'ed memory
* block (NULL on errors). Memory for the scatterlist is allocated
* using kmalloc. The caller must free the memory.
*/
struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages);

/*
* Return a scatterlist for a an array of userpages (NULL on errors).
* Memory for the scatterlist is allocated using kmalloc. The caller
* must free the memory.
*/
struct scatterlist *videobuf_pages_to_sg(struct page **pages, int nr_pages,
int offset);

/* --------------------------------------------------------------------- */

/*
* A small set of helper functions to manage buffers (both userland
* and kernel) for DMA.
Expand Down

0 comments on commit 7338c6b

Please sign in to comment.