ARM: dma-mapping: introduce DMA_ERROR_CODE constant

Replace all uses of ~0 with DMA_ERROR_CODE, what should make the code
easier to read.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
This commit is contained in:
Marek Szyprowski
2012-02-29 14:45:28 +01:00
parent 6b6f770b57
commit 553ac78877
3 changed files with 7 additions and 5 deletions

View File

@@ -342,7 +342,7 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
*/
gfp &= ~(__GFP_COMP);
*handle = ~0;
*handle = DMA_ERROR_CODE;
size = PAGE_ALIGN(size);
page = __dma_alloc_buffer(dev, size, gfp);