]> nv-tegra.nvidia Code Review - linux-3.10.git/blobdiff - drivers/media/video/saa7134/saa7134-core.c
[PATCH] saa7134: mark little endian ptr
[linux-3.10.git] / drivers / media / video / saa7134 / saa7134-core.c
index d506cafba8ffe55ca74e7d897d4ec358bb146b7f..634a2d25f2f5cbd4ea7ecff5824e3cd3cbd7c232 100644 (file)
@@ -316,7 +316,7 @@ unsigned long saa7134_buffer_base(struct saa7134_buf *buf)
 
 int saa7134_pgtable_alloc(struct pci_dev *pci, struct saa7134_pgtable *pt)
 {
-        u32          *cpu;
+        __le32       *cpu;
         dma_addr_t   dma_addr;
 
        cpu = pci_alloc_consistent(pci, SAA7134_PGTABLE_SIZE, &dma_addr);
@@ -332,7 +332,7 @@ int saa7134_pgtable_build(struct pci_dev *pci, struct saa7134_pgtable *pt,
                          struct scatterlist *list, unsigned int length,
                          unsigned int startpage)
 {
-       u32           *ptr;
+       __le32        *ptr;
        unsigned int  i,p;
 
        BUG_ON(NULL == pt || NULL == pt->cpu);
@@ -340,7 +340,7 @@ int saa7134_pgtable_build(struct pci_dev *pci, struct saa7134_pgtable *pt,
        ptr = pt->cpu + startpage;
        for (i = 0; i < length; i++, list++)
                for (p = 0; p * 4096 < list->length; p++, ptr++)
-                       *ptr = sg_dma_address(list) - list->offset;
+                       *ptr = cpu_to_le32(sg_dma_address(list) - list->offset);
        return 0;
 }