提交 c9c12b79 编写于 作者: A Alexey Dobriyan 提交者: Linus Torvalds

[PATCH] saa7134: mark little endian ptr

> -			*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: NAlexey Dobriyan <adobriyan@gmail.com>
Acked-by: NGerd Knorr <kraxel@bytesex.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 a20758fa
...@@ -316,7 +316,7 @@ unsigned long saa7134_buffer_base(struct saa7134_buf *buf) ...@@ -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) int saa7134_pgtable_alloc(struct pci_dev *pci, struct saa7134_pgtable *pt)
{ {
u32 *cpu; __le32 *cpu;
dma_addr_t dma_addr; dma_addr_t dma_addr;
cpu = pci_alloc_consistent(pci, SAA7134_PGTABLE_SIZE, &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, ...@@ -332,7 +332,7 @@ int saa7134_pgtable_build(struct pci_dev *pci, struct saa7134_pgtable *pt,
struct scatterlist *list, unsigned int length, struct scatterlist *list, unsigned int length,
unsigned int startpage) unsigned int startpage)
{ {
u32 *ptr; __le32 *ptr;
unsigned int i,p; unsigned int i,p;
BUG_ON(NULL == pt || NULL == pt->cpu); BUG_ON(NULL == pt || NULL == pt->cpu);
......
...@@ -241,7 +241,7 @@ struct saa7134_dma; ...@@ -241,7 +241,7 @@ struct saa7134_dma;
/* saa7134 page table */ /* saa7134 page table */
struct saa7134_pgtable { struct saa7134_pgtable {
unsigned int size; unsigned int size;
u32 *cpu; __le32 *cpu;
dma_addr_t dma; dma_addr_t dma;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册