[PATCH] saa7134: mark little endian ptr
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 24 Jun 2005 05:04:37 +0000 (22:04 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 24 Jun 2005 07:06:36 +0000 (00:06 -0700)
> - *ptr = sg_dma_address(list) - list->offset;
> + *ptr = cpu_to_le32(sg_dma_address(list) - list->offset);

Clearly mark pointers to little-endian things.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134.h

index 73bb5601032cfa7dd3427589efff00993eaca05d..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);
index ac90a985323608ff20fc95383d2fe040e3825118..1363c3e3f8d3e3dc46d984f78e6e029185898158 100644 (file)
@@ -241,7 +241,7 @@ struct saa7134_dma;
 /* saa7134 page table */
 struct saa7134_pgtable {
        unsigned int               size;
-       u32                        *cpu;
+       __le32                     *cpu;
        dma_addr_t                 dma;
 };