Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

m68k: Add missing dma_sync_single_range_for_{cpu,device}()

| include/linux/ssb/ssb.h: In function 'ssb_dma_sync_single_range_for_cpu':
| include/linux/ssb/ssb.h:517: error: implicit declaration of function 'dma_sync_single_range_for_cpu'
| include/linux/ssb/ssb.h: In function 'ssb_dma_sync_single_range_for_device':
| include/linux/ssb/ssb.h:538: error: implicit declaration of function 'dma_sync_single_range_for_device'

Add the missing dma_sync_single_range_for_{cpu,device}(), and remove the
`inline' for the non-static function dma_sync_single_for_device().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Geert Uytterhoeven and committed by
Linus Torvalds
dec6d14d 7ae4833a

+18 -2
+2 -2
arch/m68k/kernel/dma.c
··· 66 66 } 67 67 EXPORT_SYMBOL(dma_free_coherent); 68 68 69 - inline void dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size, 70 - enum dma_data_direction dir) 69 + void dma_sync_single_for_device(struct device *dev, dma_addr_t handle, 70 + size_t size, enum dma_data_direction dir) 71 71 { 72 72 switch (dir) { 73 73 case DMA_TO_DEVICE:
+16
include/asm-m68k/dma-mapping.h
··· 74 74 extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int, 75 75 enum dma_data_direction); 76 76 77 + static inline void dma_sync_single_range_for_device(struct device *dev, 78 + dma_addr_t dma_handle, unsigned long offset, size_t size, 79 + enum dma_data_direction direction) 80 + { 81 + /* just sync everything for now */ 82 + dma_sync_single_for_device(dev, dma_handle, offset + size, direction); 83 + } 84 + 77 85 static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, 78 86 size_t size, enum dma_data_direction dir) 79 87 { ··· 90 82 static inline void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, 91 83 int nents, enum dma_data_direction dir) 92 84 { 85 + } 86 + 87 + static inline void dma_sync_single_range_for_cpu(struct device *dev, 88 + dma_addr_t dma_handle, unsigned long offset, size_t size, 89 + enum dma_data_direction direction) 90 + { 91 + /* just sync everything for now */ 92 + dma_sync_single_for_cpu(dev, dma_handle, offset + size, direction); 93 93 } 94 94 95 95 static inline int dma_mapping_error(struct device *dev, dma_addr_t handle)