From 5fd75a7850b5156aa93c9fb6404adb8f563b6e02 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 26 May 2010 14:44:18 -0700 Subject: dma-mapping: remove unnecessary sync_single_range_* in dma_map_ops sync_single_range_for_cpu and sync_single_range_for_device hooks are unnecessary because sync_single_for_cpu and sync_single_for_device can be used instead. Signed-off-by: FUJITA Tomonori Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-generic/dma-mapping-common.h | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'include/asm-generic/dma-mapping-common.h') diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h index 69206957b72c..0c80bb38773f 100644 --- a/include/asm-generic/dma-mapping-common.h +++ b/include/asm-generic/dma-mapping-common.h @@ -123,15 +123,7 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev, size_t size, enum dma_data_direction dir) { - struct dma_map_ops *ops = get_dma_ops(dev); - - BUG_ON(!valid_dma_direction(dir)); - if (ops->sync_single_range_for_cpu) { - ops->sync_single_range_for_cpu(dev, addr, offset, size, dir); - debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); - - } else - dma_sync_single_for_cpu(dev, addr + offset, size, dir); + dma_sync_single_for_cpu(dev, addr + offset, size, dir); } static inline void dma_sync_single_range_for_device(struct device *dev, @@ -140,15 +132,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev, size_t size, enum dma_data_direction dir) { - struct dma_map_ops *ops = get_dma_ops(dev); - - BUG_ON(!valid_dma_direction(dir)); - if (ops->sync_single_range_for_device) { - ops->sync_single_range_for_device(dev, addr, offset, size, dir); - debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); - - } else - dma_sync_single_for_device(dev, addr + offset, size, dir); + dma_sync_single_for_device(dev, addr + offset, size, dir); } static inline void -- cgit v1.2.2