OSDN Git Service

media: v4l: cadence: add VIDEO_V4L2 dependency
authorArnd Bergmann <arnd@arndb.de>
Wed, 30 May 2018 22:07:10 +0000 (18:07 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 27 Jun 2018 13:51:49 +0000 (09:51 -0400)
commitf6f630327de95c251741c1f682a94243c48f2b13
tree64fb39c7fcdf16439c2644a53c1a7ad375ce5539
parent3c46ab9d37e542dd28ee27ee31defe5f8b5e466c
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: 1fc3b37f34f6 ("media: v4l: cadence: Add Cadence MIPI-CSI2 RX driver")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/cadence/Kconfig