summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/vio.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-02-09 17:19:21 +0100
committerTakashi Iwai <tiwai@suse.de>2009-02-09 17:19:21 +0100
commit2a074f4a54d11ec0ce16b35e9a88feaa2fd886aa (patch)
treeb81ab05dac66fa0cccf44896d2d86be7ba52aa49 /arch/powerpc/kernel/vio.c
parent23c7b521c250b261dd97a7a06d5a2e74b56233d5 (diff)
parent8bd4bb7a35e8ebb015a531218614c48e10a3c4ee (diff)
downloadlinux-stable-2a074f4a54d11ec0ce16b35e9a88feaa2fd886aa.tar.gz
linux-stable-2a074f4a54d11ec0ce16b35e9a88feaa2fd886aa.tar.bz2
linux-stable-2a074f4a54d11ec0ce16b35e9a88feaa2fd886aa.zip
Merge branch 'topic/quirk-cleanup' into topic/hda
Diffstat (limited to 'arch/powerpc/kernel/vio.c')
-rw-r--r--arch/powerpc/kernel/vio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 94aa7b011b27..d3694498f3af 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -492,14 +492,14 @@ static void *vio_dma_iommu_alloc_coherent(struct device *dev, size_t size,
struct vio_dev *viodev = to_vio_dev(dev);
void *ret;
- if (vio_cmo_alloc(viodev, roundup(size, IOMMU_PAGE_SIZE))) {
+ if (vio_cmo_alloc(viodev, roundup(size, PAGE_SIZE))) {
atomic_inc(&viodev->cmo.allocs_failed);
return NULL;
}
ret = dma_iommu_ops.alloc_coherent(dev, size, dma_handle, flag);
if (unlikely(ret == NULL)) {
- vio_cmo_dealloc(viodev, roundup(size, IOMMU_PAGE_SIZE));
+ vio_cmo_dealloc(viodev, roundup(size, PAGE_SIZE));
atomic_inc(&viodev->cmo.allocs_failed);
}
@@ -513,7 +513,7 @@ static void vio_dma_iommu_free_coherent(struct device *dev, size_t size,
dma_iommu_ops.free_coherent(dev, size, vaddr, dma_handle);
- vio_cmo_dealloc(viodev, roundup(size, IOMMU_PAGE_SIZE));
+ vio_cmo_dealloc(viodev, roundup(size, PAGE_SIZE));
}
static dma_addr_t vio_dma_iommu_map_page(struct device *dev, struct page *page,
@@ -572,6 +572,7 @@ static int vio_dma_iommu_map_sg(struct device *dev, struct scatterlist *sglist,
if (unlikely(!ret)) {
vio_cmo_dealloc(viodev, alloc_size);
atomic_inc(&viodev->cmo.allocs_failed);
+ return ret;
}
for (sgl = sglist, count = 0; count < ret; count++, sgl++)