diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-02 17:32:46 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-02 17:32:46 -0200 |
commit | 49335aab3d6d92e5022bae733347abb40332e5e6 (patch) | |
tree | 47bd7e8d02bc2e28bbed9c8dffe088524fafe4b3 /linux/drivers/media/video/ivtv | |
parent | 565a187e1f60cb82d9fe226d5668d28f1f85fdb4 (diff) | |
download | mediapointer-dvb-s2-49335aab3d6d92e5022bae733347abb40332e5e6.tar.gz mediapointer-dvb-s2-49335aab3d6d92e5022bae733347abb40332e5e6.tar.bz2 |
Backport some changesets touching S/G code
From: Mauro Carvalho Chehab <mchehab@infradead.org>
kernel-sync:
Backport kernel changesets:
45711f1af6eff1a6d010703b4862e0d2b9afd056
117636092a87a28a013a4acb5de5492645ed620f
642f149031d70415d9318b919d50b71e4724adbd
Also, added newer entreis at compat.h, to avoid needing to add checks for linux
versions inside the source codes.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/ivtv')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-driver.h | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-udma.c | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.h b/linux/drivers/media/video/ivtv/ivtv-driver.h index 592b03fe9..b1511cbf4 100644 --- a/linux/drivers/media/video/ivtv/ivtv-driver.h +++ b/linux/drivers/media/video/ivtv/ivtv-driver.h @@ -51,6 +51,7 @@ #include <linux/unistd.h> #include <linux/byteorder/swab.h> #include <linux/pagemap.h> +#include <linux/scatterlist.h> #include <linux/workqueue.h> #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) #include <linux/mutex.h> diff --git a/linux/drivers/media/video/ivtv/ivtv-udma.c b/linux/drivers/media/video/ivtv/ivtv-udma.c index c4626d1cd..5d4964b24 100644 --- a/linux/drivers/media/video/ivtv/ivtv-udma.c +++ b/linux/drivers/media/video/ivtv/ivtv-udma.c @@ -22,6 +22,7 @@ #include "ivtv-driver.h" #include "ivtv-udma.h" +#include "compat.h" void ivtv_udma_get_page_info(struct ivtv_dma_page_info *dma_page, unsigned long first, unsigned long size) { @@ -49,8 +50,6 @@ int ivtv_udma_fill_sg_list (struct ivtv_user_dma *dma, struct ivtv_dma_page_info unsigned int len = (i == dma_page->page_count - 1) ? dma_page->tail : PAGE_SIZE - offset; - dma->SGlist[map_offset].length = len; - dma->SGlist[map_offset].offset = offset; if (PageHighMem(dma->map[map_offset])) { void *src; @@ -63,10 +62,10 @@ int ivtv_udma_fill_sg_list (struct ivtv_user_dma *dma, struct ivtv_dma_page_info memcpy(page_address(dma->bouncemap[map_offset]) + offset, src, len); kunmap_atomic(src, KM_BOUNCE_READ); local_irq_restore(flags); - dma->SGlist[map_offset].page = dma->bouncemap[map_offset]; + sg_set_page(&dma->SGlist[map_offset], dma->bouncemap[map_offset], len, offset); } else { - dma->SGlist[map_offset].page = dma->map[map_offset]; + sg_set_page(&dma->SGlist[map_offset], dma->map[map_offset], len, offset); } offset = 0; map_offset++; |