public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: stm32-dma2d: fix Kconfig dependencies
@ 2021-10-29 11:50 Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2021-10-29 11:50 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Dillon Min, Hans Verkuil
  Cc: Arnd Bergmann, Alexandre Courbot, Stanimir Varbanov, Yunfei Dong,
	linux-media, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The new DMA2D accidentally allowed compile-testing configurations
that clearly cannot link:

ld.lld: error: undefined symbol: v4l_vb2q_enable_media_source
>>> referenced by videobuf2-core.c
>>>               media/common/videobuf2/videobuf2-core.o:(vb2_core_streamon) in archive drivers/built-in.a

ld.lld: error: undefined symbol: v4l2_device_register
>>> referenced by dma2d.c
>>>               media/platform/stm32/dma2d/dma2d.o:(dma2d_probe) in archive drivers/built-in.a

ld.lld: error: undefined symbol: video_device_alloc
>>> referenced by dma2d.c
>>>               media/platform/stm32/dma2d/dma2d.o:(dma2d_probe) in archive drivers/built-in.a

ld.lld: error: undefined symbol: v4l2_m2m_init
>>> referenced by dma2d.c
>>>               media/platform/stm32/dma2d/dma2d.o:(dma2d_probe) in archive drivers/built-in.a

Tighten the dependencies to only allow test builds when VIDEO_V4L2
is available, but keep it possible for non-stm32 targets.

Fixes: bdbbd511ef0c ("media: stm32-dma2d: STM32 DMA2D driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/platform/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index 68f16aef8754..9fbdba0fd1e7 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -494,7 +494,8 @@ endif # VIDEO_STI_DELTA
 
 config VIDEO_STM32_DMA2D
 	tristate "STM32 Chrom-Art Accelerator (DMA2D)"
-	depends on (VIDEO_DEV && VIDEO_V4L2 && ARCH_STM32) || COMPILE_TEST
+	depends on VIDEO_DEV && VIDEO_V4L2
+	depends on ARCH_STM32 || COMPILE_TEST
 	select VIDEOBUF2_DMA_CONTIG
 	select V4L2_MEM2MEM_DEV
 	help
-- 
2.29.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-29 11:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-29 11:50 [PATCH] media: stm32-dma2d: fix Kconfig dependencies Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox