diff options
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/saa7146_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c index 365a22118a09..2b1f8b4be00a 100644 --- a/drivers/media/common/saa7146_core.c +++ b/drivers/media/common/saa7146_core.c | |||
@@ -112,12 +112,13 @@ static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages) | |||
112 | sglist = kcalloc(nr_pages, sizeof(struct scatterlist), GFP_KERNEL); | 112 | sglist = kcalloc(nr_pages, sizeof(struct scatterlist), GFP_KERNEL); |
113 | if (NULL == sglist) | 113 | if (NULL == sglist) |
114 | return NULL; | 114 | return NULL; |
115 | sg_init_table(sglist, nr_pages); | ||
115 | for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) { | 116 | for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) { |
116 | pg = vmalloc_to_page(virt); | 117 | pg = vmalloc_to_page(virt); |
117 | if (NULL == pg) | 118 | if (NULL == pg) |
118 | goto err; | 119 | goto err; |
119 | BUG_ON(PageHighMem(pg)); | 120 | BUG_ON(PageHighMem(pg)); |
120 | sglist[i].page = pg; | 121 | sg_set_page(&sglist[i], pg); |
121 | sglist[i].length = PAGE_SIZE; | 122 | sglist[i].length = PAGE_SIZE; |
122 | } | 123 | } |
123 | return sglist; | 124 | return sglist; |