Commit f6f63032 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mauro Carvalho Chehab

media: v4l: cadence: add VIDEO_V4L2 dependency

The cadence media drivers can be built-in while the v4l2 core is a loadable
module. This is a mistake and leads to link errors:

drivers/media/v4l2-core/v4l2-fwnode.o: In function `v4l2_async_register_subdev_sensor_common':
v4l2-fwnode.c:(.text+0x12f0): undefined reference to `v4l2_async_subdev_notifier_register'
v4l2-fwnode.c:(.text+0x1304): undefined reference to `v4l2_async_register_subdev'
v4l2-fwnode.c:(.text+0x1318): undefined reference to `v4l2_async_notifier_unregister'
v4l2-fwnode.c:(.text+0x1338): undefined reference to `v4l2_async_notifier_cleanup'
cdns-csi2rx.c:(.text+0x9f8): undefined reference to `v4l2_subdev_init'
cdns-csi2rx.c:(.text+0xa78): undefined reference to `v4l2_async_register_subdev'
drivers/media/platform/cadence/cdns-csi2tx.o: In function `csi2tx_remove':
cdns-csi2tx.c:(.text+0x88): undefined reference to `v4l2_async_unregister_subdev'
drivers/media/platform/cadence/cdns-csi2tx.o: In function `csi2tx_probe':
cdns-csi2tx.c:(.text+0x884): undefined reference to `v4l2_subdev_init'
cdns-csi2tx.c:(.text+0xa9c): undefined reference to `v4l2_async_register_subdev'

An explicit Kconfig dependency on VIDEO_V4L2 avoids the problem.

Fixes: 1fc3b37f ("media: v4l: cadence: Add Cadence MIPI-CSI2 RX driver")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 3c46ab9d
...@@ -11,6 +11,7 @@ if VIDEO_CADENCE ...@@ -11,6 +11,7 @@ if VIDEO_CADENCE
config VIDEO_CADENCE_CSI2RX config VIDEO_CADENCE_CSI2RX
tristate "Cadence MIPI-CSI2 RX Controller" tristate "Cadence MIPI-CSI2 RX Controller"
depends on VIDEO_V4L2
depends on MEDIA_CONTROLLER depends on MEDIA_CONTROLLER
depends on VIDEO_V4L2_SUBDEV_API depends on VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE select V4L2_FWNODE
...@@ -22,6 +23,7 @@ config VIDEO_CADENCE_CSI2RX ...@@ -22,6 +23,7 @@ config VIDEO_CADENCE_CSI2RX
config VIDEO_CADENCE_CSI2TX config VIDEO_CADENCE_CSI2TX
tristate "Cadence MIPI-CSI2 TX Controller" tristate "Cadence MIPI-CSI2 TX Controller"
depends on VIDEO_V4L2
depends on MEDIA_CONTROLLER depends on MEDIA_CONTROLLER
depends on VIDEO_V4L2_SUBDEV_API depends on VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE select V4L2_FWNODE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment