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

[media] davinci: add V4L2 dependencies

The davinci media drivers use videobuf2, which they enable through
a 'select' statement. If one of these drivers is built-in, but
the v4l2 core is a loadable modules, we end up with a link
error:

drivers/built-in.o: In function `vb2_fop_mmap':
:(.text+0x113e84): undefined reference to `video_devdata'
drivers/built-in.o: In function `vb2_ioctl_create_bufs':
:(.text+0x114710): undefined reference to `video_devdata'
drivers/built-in.o: In function `vb2_ioctl_reqbufs':
:(.text+0x114ed8): undefined reference to `video_devdata'
drivers/built-in.o: In function `vb2_ioctl_querybuf':
:(.text+0x115530): undefined reference to `video_devdata'

To solve this, we need to add a dependency on VIDEO_V4L2,
which enforces that the davinci drivers themselves can only
be loadable modules if V4L2 is not built-in, and they do
not cause the videobuf2 code to be built-in.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Arnd Bergmann and committed by
Mauro Carvalho Chehab
24692801 eb79dbf6

+3 -3
+3 -3
drivers/media/platform/davinci/Kconfig
··· 1 1 config VIDEO_DAVINCI_VPIF_DISPLAY 2 2 tristate "TI DaVinci VPIF V4L2-Display driver" 3 - depends on VIDEO_DEV 3 + depends on VIDEO_V4L2 4 4 depends on ARCH_DAVINCI || COMPILE_TEST 5 5 depends on HAS_DMA 6 6 select VIDEOBUF2_DMA_CONTIG ··· 16 16 17 17 config VIDEO_DAVINCI_VPIF_CAPTURE 18 18 tristate "TI DaVinci VPIF video capture driver" 19 - depends on VIDEO_DEV 19 + depends on VIDEO_V4L2 20 20 depends on ARCH_DAVINCI || COMPILE_TEST 21 21 depends on HAS_DMA 22 22 select VIDEOBUF2_DMA_CONTIG ··· 75 75 76 76 config VIDEO_DAVINCI_VPBE_DISPLAY 77 77 tristate "TI DaVinci VPBE V4L2-Display driver" 78 - depends on ARCH_DAVINCI 78 + depends on VIDEO_V4L2 && ARCH_DAVINCI 79 79 depends on HAS_DMA 80 80 select VIDEOBUF2_DMA_CONTIG 81 81 help