]> Pileus Git - ~andy/linux/blobdiff - drivers/ieee1394/dma.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[~andy/linux] / drivers / ieee1394 / dma.c
index 45d6055819227367fb318e472b1ee2de990b458f..7c4eb39b70241ef55f2bcc6ff4e7330acdc03938 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
-#include <asm/scatterlist.h>
+#include <linux/scatterlist.h>
 
 #include "dma.h"
 
@@ -103,16 +103,15 @@ int dma_region_alloc(struct dma_region *dma, unsigned long n_bytes,
                goto err;
        }
 
-       /* just to be safe - this will become unnecessary once sglist->address goes away */
-       memset(dma->sglist, 0, dma->n_pages * sizeof(*dma->sglist));
+       sg_init_table(dma->sglist, dma->n_pages);
 
        /* fill scatter/gather list with pages */
        for (i = 0; i < dma->n_pages; i++) {
                unsigned long va =
                    (unsigned long)dma->kvirt + (i << PAGE_SHIFT);
 
-               dma->sglist[i].page = vmalloc_to_page((void *)va);
-               dma->sglist[i].length = PAGE_SIZE;
+               sg_set_page(&dma->sglist[i], vmalloc_to_page((void *)va),
+                               PAGE_SIZE, 0);
        }
 
        /* map sglist to the IOMMU */