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

ARM: omap1: add back omap_set_dma_priority() stub

One of my multiplatform patches went a little too far and removed
a declaration that is needed for compile-testing the omapfb
driver on non-OMAP1 platforms:

arm-linux-gnueabi-ld: drivers/video/fbdev/omap/omapfb_main.o: in function `omapfb_do_probe':
omapfb_main.c:(.text+0x41ec): undefined reference to `omap_set_dma_priority'

Add back the inline stub, and in turn hide the definition when
omapfb is disabled, like we do for the usb specific bits.

Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Fixes: 52ef8efcb75e ("dma: omap: hide legacy interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+9 -16
+2 -16
arch/arm/mach-omap1/omap-dma.c
··· 99 99 omap_writel(l, reg); 100 100 } 101 101 102 - #ifdef CONFIG_ARCH_OMAP1 102 + #if IS_ENABLED(CONFIG_FB_OMAP) 103 103 void omap_set_dma_priority(int lch, int dst_port, int priority) 104 104 { 105 105 unsigned long reg; ··· 129 129 omap_writel(l, reg); 130 130 } 131 131 } 132 - #endif 133 - 134 - #ifdef CONFIG_ARCH_OMAP2PLUS 135 - void omap_set_dma_priority(int lch, int dst_port, int priority) 136 - { 137 - u32 ccr; 138 - 139 - ccr = p->dma_read(CCR, lch); 140 - if (priority) 141 - ccr |= (1 << 6); 142 - else 143 - ccr &= ~(1 << 6); 144 - p->dma_write(ccr, CCR, lch); 145 - } 146 - #endif 147 132 EXPORT_SYMBOL(omap_set_dma_priority); 133 + #endif 148 134 149 135 #if IS_ENABLED(CONFIG_USB_OMAP) 150 136 #ifdef CONFIG_ARCH_OMAP15XX
+7
include/linux/omap-dma.h
··· 294 294 295 295 extern struct omap_system_dma_plat_info *omap_get_plat_info(void); 296 296 297 + #if defined(CONFIG_ARCH_OMAP1) 297 298 extern void omap_set_dma_priority(int lch, int dst_port, int priority); 299 + #else 300 + static inline void omap_set_dma_priority(int lch, int dst_port, int priority) 301 + { 302 + } 303 + #endif 304 + 298 305 extern int omap_request_dma(int dev_id, const char *dev_name, 299 306 void (*callback)(int lch, u16 ch_status, void *data), 300 307 void *data, int *dma_ch);