summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo+renesas@jmondi.org>2018-08-07 18:38:14 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-08 17:57:14 +0300
commit484f9b372dd8da6a4a9867ebcd10e5c2b21ab478 (patch)
tree14cdcec84864a528f55d06199d2c5af99f0a6352 /drivers/media
parent8218840f76a525f014f404b5e97d9523e327f4b0 (diff)
downloadlinux-484f9b372dd8da6a4a9867ebcd10e5c2b21ab478.tar.xz
media: mt9v111: Fix build error with no VIDEO_V4L2_SUBDEV_API
The v4l2_subdev_get_try_format() function is only defined if the VIDEO_V4L2_SUBDEV_API Kconfig option is enabled. Builds configured without that symbol fails with: drivers/media/i2c/mt9v111.c:801:10: error: implicit declaration of function 'v4l2_subdev_get_try_format'; Fix this by protecting the function call by testing for the right symbol. media: mt9v111: fix random build errors Fix the internal check for it to do the right thing if the subdev API is not built. Fixes: aab7ed1c ("media: i2c: Add driver for Aptina MT9V111") Reported-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/mt9v111.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index 70fad0940435..b5410aeb5fe2 100644
--- a/drivers/media/i2c/mt9v111.c
+++ b/drivers/media/i2c/mt9v111.c
@@ -797,7 +797,7 @@ static struct v4l2_mbus_framefmt *__mt9v111_get_pad_format(
{
switch (which) {
case V4L2_SUBDEV_FORMAT_TRY:
-#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER)
+#if IS_ENABLED(CONFIG_VIDEO_V4L2_SUBDEV_API)
return v4l2_subdev_get_try_format(&mt9v111->sd, cfg, pad);
#else
return &cfg->try_fmt;