diff options
author | Matthew Wilcox <matthew@wil.cx> | 2006-10-06 16:12:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-10-13 23:43:51 -0400 |
commit | 7844d7561307d6f8b0dd18b91f4dc6cff53848b4 (patch) | |
tree | 3a64b08a712504fa17b8b237f158d2406bb5adf6 /drivers/media | |
parent | 76dc82ab57236105285fd8520895c1404b8b952f (diff) |
V4L/DVB (4725): Fix vivi compile on parisc
parisc (and several other architectures) don't have a dma_address in their
sg list. Use the macro instead.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/vivi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index e7c01d560b64..3c8dc72dc8e9 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -272,7 +272,7 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, | |||
272 | 272 | ||
273 | /* Get first addr pointed to pixel position */ | 273 | /* Get first addr pointed to pixel position */ |
274 | oldpg=get_addr_pos(pos,pages,to_addr); | 274 | oldpg=get_addr_pos(pos,pages,to_addr); |
275 | pg=pfn_to_page(to_addr[oldpg].sg->dma_address >> PAGE_SHIFT); | 275 | pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT); |
276 | basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset; | 276 | basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset; |
277 | 277 | ||
278 | /* We will just duplicate the second pixel at the packet */ | 278 | /* We will just duplicate the second pixel at the packet */ |
@@ -287,7 +287,7 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, | |||
287 | for (color=0;color<4;color++) { | 287 | for (color=0;color<4;color++) { |
288 | pgpos=get_addr_pos(pos,pages,to_addr); | 288 | pgpos=get_addr_pos(pos,pages,to_addr); |
289 | if (pgpos!=oldpg) { | 289 | if (pgpos!=oldpg) { |
290 | pg=pfn_to_page(to_addr[pgpos].sg->dma_address >> PAGE_SHIFT); | 290 | pg=pfn_to_page(sg_dma_address(to_addr[pgpos].sg) >> PAGE_SHIFT); |
291 | kunmap_atomic(basep, KM_BOUNCE_READ); | 291 | kunmap_atomic(basep, KM_BOUNCE_READ); |
292 | basep= kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[pgpos].sg->offset; | 292 | basep= kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[pgpos].sg->offset; |
293 | oldpg=pgpos; | 293 | oldpg=pgpos; |
@@ -339,8 +339,8 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, | |||
339 | for (color=0;color<4;color++) { | 339 | for (color=0;color<4;color++) { |
340 | pgpos=get_addr_pos(pos,pages,to_addr); | 340 | pgpos=get_addr_pos(pos,pages,to_addr); |
341 | if (pgpos!=oldpg) { | 341 | if (pgpos!=oldpg) { |
342 | pg=pfn_to_page(to_addr[pgpos]. | 342 | pg=pfn_to_page(sg_dma_address( |
343 | sg->dma_address | 343 | to_addr[pgpos].sg) |
344 | >> PAGE_SHIFT); | 344 | >> PAGE_SHIFT); |
345 | kunmap_atomic(basep, | 345 | kunmap_atomic(basep, |
346 | KM_BOUNCE_READ); | 346 | KM_BOUNCE_READ); |
@@ -386,7 +386,7 @@ static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf) | |||
386 | struct timeval ts; | 386 | struct timeval ts; |
387 | 387 | ||
388 | /* Test if DMA mapping is ready */ | 388 | /* Test if DMA mapping is ready */ |
389 | if (!vb->dma.sglist[0].dma_address) | 389 | if (!sg_dma_address(&vb->dma.sglist[0])) |
390 | return; | 390 | return; |
391 | 391 | ||
392 | prep_to_addr(to_addr,vb); | 392 | prep_to_addr(to_addr,vb); |
@@ -783,7 +783,7 @@ static int vivi_map_sg(void *dev, struct scatterlist *sg, int nents, | |||
783 | for (i = 0; i < nents; i++ ) { | 783 | for (i = 0; i < nents; i++ ) { |
784 | BUG_ON(!sg[i].page); | 784 | BUG_ON(!sg[i].page); |
785 | 785 | ||
786 | sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset; | 786 | sg_dma_address(&sg[i]) = page_to_phys(sg[i].page) + sg[i].offset; |
787 | } | 787 | } |
788 | 788 | ||
789 | return nents; | 789 | return nents; |