media: i2c: add KConfig dependencies
PATCH 1/1 media: i2c: add KConfig dependencies
The new ov5670 driver fails to build when VIDEO_V4L2_SUBDEV_API or MEDIA_CONTROLLER are disabled:
drivers/media/i2c/ov5670.c: In function 'ov5670_open':drivers/media/i2c/ov5670.c:1917:5: error: implicit declaration of function 'v4l2_subdev_get_try_format'; did you mean 'v4l2_subdev_notify_event'? [-Werror=implicit-function-declaration]
v4l2_subdev_get_try_format(sd, fh->pad, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~
v4l2_subdev_notify_event
drivers/media/i2c/ov5670.c:1917:38: error: 'struct v4l2_subdev_fh' has no member named 'pad'
v4l2_subdev_get_try_format(sd, fh->pad, 0);
^~
drivers/media/i2c/ov5670.c: In function 'ov5670_do_get_pad_format':
drivers/media/i2c/ov5670.c:2198:17: error: invalid type argument of unary '*' (have 'int')
fmt->format = *v4l2_subdev_get_try_format(&ov5670->sd, cfg,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fmt->pad);
~~~~~~~~~
drivers/media/i2c/ov5670.c: At top level:
drivers/media/i2c/ov5670.c:2444:19: error: 'v4l2_subdev_link_validate' undeclared here (not in a function); did you mean 'v4l2_subdev_init'?
.link_validate = v4l2_subdev_link_validate,
^~~~~~~~~~~~~~~~~~~~~~~~~
v4l2_subdev_initdrivers/media/i2c/ov5670.c: In function 'ov5670_probe':drivers/media/i2c/ov5670.c:2492:12: error: 'struct v4l2_subdev' has no member named 'entity'
This adds both to the Kconfig entry.
--- drivers/media/i2c/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/Kconfig +2 -1
@@ -618,8 +618,9 @@ config VIDEO_OV6650 config VIDEO_OV5670 tristate "OmniVision OV5670 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API depends on MEDIA_CAMERA_SUPPORT + depends on MEDIA_CONTROLLER select V4L2_FWNODE ---help--- This is a Video4Linux2 sensor-level driver for the OmniVision
Signature · 1 line
2.9.0
Sakari Ailus
AppliedHi Arnd,
Thanks for the patch.
drivers/media/i2c/Kconfig config VIDEO_OV6650 · line 626
Quoted 11 lines · Arnd Bergmann
drivers/media/i2c/Kconfig +2
-1@@ -618,8 +618,9 @@ config VIDEO_OV6650 config VIDEO_OV5670 tristate "OmniVision OV5670 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API depends on MEDIA_CAMERA_SUPPORT + depends on MEDIA_CONTROLLER select V4L2_FWNODE ---help--- This is a Video4Linux2 sensor-level driver for the OmniVision
Applied, with dropping explicit MEDIA_CONTROLLER. VIDEO_V4L2_SUBDEV_API already depends on MEDIA_CONTROLLER.
Signature · 2 lines
Sakari Ailus e-mail: [email protected] XMPP: [email protected]
Quoted 7 lines · Sakari Ailus
Hi Arnd,
Thanks for the patch.
Quoted 2 lines · Arnd Bergmann
(quoted diff) +0
-0@@ -618,8 +618,9 @@ config VIDEO_OV6650
Quoted 12 lines
drivers/media/i2c/Kconfig config VIDEO_OV6650 · line 626
Quoted 9 lines
drivers/media/i2c/Kconfig +2
-1config VIDEO_OV5670 tristate "OmniVision OV5670 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API depends on MEDIA_CAMERA_SUPPORT + depends on MEDIA_CONTROLLER select V4L2_FWNODE ---help--- This is a Video4Linux2 sensor-level driver for the OmniVisionApplied, with dropping explicit
MEDIA_CONTROLLER.VIDEO_V4L2_SUBDEV_APIalready depends onMEDIA_CONTROLLER.
makes sense, thanks!
Arnd