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

media: staging/imx: always select VIDEOBUF2_DMA_CONTIG

I ran into a rare build error during randconfig testing:

drivers/staging/media/imx/imx-media-capture.o: In function `capture_stop_streaming':
imx-media-capture.c:(.text+0x224): undefined reference to `vb2_buffer_done'
drivers/staging/media/imx/imx-media-capture.o: In function `imx_media_capture_device_register':
imx-media-capture.c:(.text+0xe60): undefined reference to `vb2_queue_init'
imx-media-capture.c:(.text+0xfa0): undefined reference to `vb2_dma_contig_memops'

While VIDEOBUF2_DMA_CONTIG was already selected by the camera driver,
it wasn't necessarily there with just the base driver enabled.
This moves the 'select' statement to the top-level option to make
sure it's always available.

Fixes: 64b5a49df486 ("[media] media: imx: Add Capture Device Interface")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Arnd Bergmann and committed by
Mauro Carvalho Chehab
537b5c84 651ac129

+1 -1
+1 -1
drivers/staging/media/imx/Kconfig
··· 2 2 tristate "i.MX5/6 V4L2 media core driver" 3 3 depends on MEDIA_CONTROLLER && VIDEO_V4L2 && ARCH_MXC && IMX_IPUV3_CORE 4 4 depends on VIDEO_V4L2_SUBDEV_API 5 + select VIDEOBUF2_DMA_CONTIG 5 6 select V4L2_FWNODE 6 7 ---help--- 7 8 Say yes here to enable support for video4linux media controller ··· 14 13 config VIDEO_IMX_CSI 15 14 tristate "i.MX5/6 Camera Sensor Interface driver" 16 15 depends on VIDEO_IMX_MEDIA && VIDEO_DEV && I2C 17 - select VIDEOBUF2_DMA_CONTIG 18 16 default y 19 17 ---help--- 20 18 A video4linux camera sensor interface driver for i.MX5/6.