Skip to content

Commit 766475c

Browse files
committed
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 <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Fixes: 52ef8ef ("dma: omap: hide legacy interface") Signed-off-by: Arnd Bergmann <[email protected]>
1 parent e514f1f commit 766475c

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

arch/arm/mach-omap1/omap-dma.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static inline void set_gdma_dev(int req, int dev)
9999
omap_writel(l, reg);
100100
}
101101

102-
#ifdef CONFIG_ARCH_OMAP1
102+
#if IS_ENABLED(CONFIG_FB_OMAP)
103103
void omap_set_dma_priority(int lch, int dst_port, int priority)
104104
{
105105
unsigned long reg;
@@ -129,22 +129,8 @@ void omap_set_dma_priority(int lch, int dst_port, int priority)
129129
omap_writel(l, reg);
130130
}
131131
}
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
147132
EXPORT_SYMBOL(omap_set_dma_priority);
133+
#endif
148134

149135
#if IS_ENABLED(CONFIG_USB_OMAP)
150136
#ifdef CONFIG_ARCH_OMAP15XX

include/linux/omap-dma.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,14 @@ struct omap_system_dma_plat_info {
294294

295295
extern struct omap_system_dma_plat_info *omap_get_plat_info(void);
296296

297+
#if defined(CONFIG_ARCH_OMAP1)
297298
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+
298305
extern int omap_request_dma(int dev_id, const char *dev_name,
299306
void (*callback)(int lch, u16 ch_status, void *data),
300307
void *data, int *dma_ch);

0 commit comments

Comments
 (0)