mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: i2c: add KConfig dependencies
@ 2017-07-25 15:36 Arnd Bergmann
  2017-08-09  7:48 ` Sakari Ailus
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2017-07-25 15:36 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Sakari Ailus, Chiranjeevi Rapolu
  Cc: Arnd Bergmann, Hans Verkuil, linux-media, linux-kernel

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_init
drivers/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.

Fixes: 5de35c9b8dcd ("media: i2c: Add Omnivision OV5670 5M sensor support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/i2c/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index a05e40ecba7c..94153895fcd4 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -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
-- 
2.9.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: i2c: add KConfig dependencies
  2017-07-25 15:36 [PATCH] media: i2c: add KConfig dependencies Arnd Bergmann
@ 2017-08-09  7:48 ` Sakari Ailus
  2017-08-09  8:27   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Sakari Ailus @ 2017-08-09  7:48 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mauro Carvalho Chehab, Sakari Ailus, Chiranjeevi Rapolu,
	Hans Verkuil, linux-media, linux-kernel

Hi Arnd,

Thanks for the patch.

On Tue, Jul 25, 2017 at 05:36:45PM +0200, Arnd Bergmann wrote:
> @@ -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.

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: i2c: add KConfig dependencies
  2017-08-09  7:48 ` Sakari Ailus
@ 2017-08-09  8:27   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-08-09  8:27 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Mauro Carvalho Chehab, Sakari Ailus, Chiranjeevi Rapolu,
	Hans Verkuil, Linux Media Mailing List,
	Linux Kernel Mailing List

On Wed, Aug 9, 2017 at 9:48 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
> Hi Arnd,
>
> Thanks for the patch.
>
> On Tue, Jul 25, 2017 at 05:36:45PM +0200, Arnd Bergmann wrote:
>> @@ -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.

makes sense, thanks!

       Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-09  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25 15:36 [PATCH] media: i2c: add KConfig dependencies Arnd Bergmann
2017-08-09  7:48 ` Sakari Ailus
2017-08-09  8:27   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®