Fix previous commit (inverted condition).

svn path=/dists/trunk/linux-2.6/; revision=17261
This commit is contained in:
Aurelien Jarno 2011-04-27 10:09:40 +00:00
parent 1548dd4a77
commit aea63e271d
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ index 4bce801..b038de9 100644
nvbe->nr_pages = 0;
while (num_pages--) {
- if (dma_addrs[nvbe->nr_pages] != DMA_ERROR_CODE) {
+ if (pci_dma_mapping_error(dev->pdev,
+ if (!pci_dma_mapping_error(dev->pdev,
+ dma_addrs[nvbe->nr_pages])) {
nvbe->pages[nvbe->nr_pages] =
dma_addrs[nvbe->nr_pages];

View File

@ -20,7 +20,7 @@ index 8a955bb..d96f5ea 100644
/* On TTM path, we only use the DMA API if TTM_PAGE_FLAG_DMA32
* is requested. */
- if (dma_addr[i] != DMA_ERROR_CODE) {
+ if (pci_dma_mapping_error(rdev->pdev, dma_addr[i])) {
+ if (!pci_dma_mapping_error(rdev->pdev, dma_addr[i])) {
rdev->gart.ttm_alloced[p] = true;
rdev->gart.pages_addr[p] = dma_addr[i];
} else {