diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c index 06f07bb414a85c9f76673cfb3fc86912d5f246db..96bfbd8e8fdba1db03bc8aef422c0ad8a4dff3c6 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; }