mtd/nand/r852: Use pci_dma_mapping_error()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Mar 11 12:59:01 EST 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=0c82d3ce2f479c728f99e228d9ae32a9cd853c5a
Commit:     0c82d3ce2f479c728f99e228d9ae32a9cd853c5a
Parent:     f696aa43fadb13a21c4e723fb6e51bf640dd1363
Author:     David Woodhouse <David.Woodhouse at intel.com>
AuthorDate: Thu Mar 11 09:25:14 2010 -0800
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu Mar 11 09:25:18 2010 -0800

    mtd/nand/r852: Use pci_dma_mapping_error()
    
    ... instead of comparing with DMA_ERROR_CODE, which will only work on
    powerpc/sparc/x86.
    
    Reported-by: Geert Uytterhoeven <geert at linux-m68k.org>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/r852.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c
index 06f07bb..96bfbd8 100644
--- a/drivers/mtd/nand/r852.c
+++ b/drivers/mtd/nand/r852.c
@@ -197,7 +197,7 @@ static void r852_do_dma(struct r852_device *dev, uint8_t *buf, int do_read)
 			R852_DMA_LEN,
 			(do_read ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE));
 
-		if (dev->phys_dma_addr == DMA_ERROR_CODE)
+		if (pci_dma_mapping_error(dev->pci_dev, dev->phys_dma_addr))
 			bounce = 1;
 	}
 



More information about the linux-mtd-cvs mailing list