|
@@ -321,12 +321,12 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
|
|
DO_STATS ( device_info->bounce_count++ );
|
|
DO_STATS ( device_info->bounce_count++ );
|
|
|
|
|
|
if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) {
|
|
if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) {
|
|
- unsigned long ptr;
|
|
|
|
|
|
+ void *ptr = buf->ptr;
|
|
|
|
|
|
dev_dbg(dev,
|
|
dev_dbg(dev,
|
|
"%s: copy back safe %p to unsafe %p size %d\n",
|
|
"%s: copy back safe %p to unsafe %p size %d\n",
|
|
- __func__, buf->safe, buf->ptr, size);
|
|
|
|
- memcpy(buf->ptr, buf->safe, size);
|
|
|
|
|
|
+ __func__, buf->safe, ptr, size);
|
|
|
|
+ memcpy(ptr, buf->safe, size);
|
|
|
|
|
|
/*
|
|
/*
|
|
* DMA buffers must have the same cache properties
|
|
* DMA buffers must have the same cache properties
|
|
@@ -336,7 +336,6 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
|
|
* bidirectional case because we know the cache
|
|
* bidirectional case because we know the cache
|
|
* lines will be coherent with the data written.
|
|
* lines will be coherent with the data written.
|
|
*/
|
|
*/
|
|
- ptr = (unsigned long)buf->ptr;
|
|
|
|
dmac_clean_range(ptr, ptr + size);
|
|
dmac_clean_range(ptr, ptr + size);
|
|
outer_clean_range(__pa(ptr), __pa(ptr) + size);
|
|
outer_clean_range(__pa(ptr), __pa(ptr) + size);
|
|
}
|
|
}
|