[patch] v4l: saa7134: mark little endian ptr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alexey Dobriyan <[email protected]>

> -			*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 <[email protected]>
Acked-by: Gerd Knorr <[email protected]>

diff -uprN linux-vanilla/drivers/media/video/saa7134/saa7134-core.c linux-saa/drivers/media/video/saa7134/saa7134-core.c
--- linux-vanilla/drivers/media/video/saa7134/saa7134-core.c	2005-05-10 03:13:22.000000000 +0400
+++ linux-saa/drivers/media/video/saa7134/saa7134-core.c	2005-05-12 00:27:23.000000000 +0400
@@ -316,7 +316,7 @@ unsigned long saa7134_buffer_base(struct
 
 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
 			  struct scatterlist *list, unsigned int length,
 			  unsigned int startpage)
 {
-	u32           *ptr;
+	__le32        *ptr;
 	unsigned int  i,p;
 
 	BUG_ON(NULL == pt || NULL == pt->cpu);
diff -uprN linux-vanilla/drivers/media/video/saa7134/saa7134.h linux-saa/drivers/media/video/saa7134/saa7134.h
--- linux-vanilla/drivers/media/video/saa7134/saa7134.h	2005-05-10 03:13:22.000000000 +0400
+++ linux-saa/drivers/media/video/saa7134/saa7134.h	2005-05-12 00:26:20.000000000 +0400
@@ -241,7 +241,7 @@ struct saa7134_dma;
 /* saa7134 page table */
 struct saa7134_pgtable {
 	unsigned int               size;
-	u32                        *cpu;
+	__le32                     *cpu;
 	dma_addr_t                 dma;
 };
 

----- End forwarded message -----

-- 
-mm seems unusually stable at present.
	-- akpm about 2.6.12-rc3-mm3
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux