Skip to content

Commit

Permalink
mtd/nand/r852: Use pci_dma_mapping_error()
Browse files Browse the repository at this point in the history
... instead of comparing with DMA_ERROR_CODE, which will only work on
powerpc/sparc/x86.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Mar 11, 2010
1 parent f696aa4 commit 0c82d3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/r852.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0c82d3c

Please sign in to comment.