From patchwork Sun Aug 5 22:00:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 10556221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96BB014E2 for ; Sun, 5 Aug 2018 22:00:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F2A72931B for ; Sun, 5 Aug 2018 22:00:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7322C29325; Sun, 5 Aug 2018 22:00:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 630E12931B for ; Sun, 5 Aug 2018 22:00:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727313AbeHFAG6 (ORCPT ); Sun, 5 Aug 2018 20:06:58 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:43441 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727147AbeHFAG6 (ORCPT ); Sun, 5 Aug 2018 20:06:58 -0400 X-Originating-IP: 82.50.90.136 Received: from w540.example.org (host136-90-dynamic.50-82-r.retail.telecomitalia.it [82.50.90.136]) (Authenticated sender: jacopo@jmondi.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 382E020002; Sun, 5 Aug 2018 22:00:49 +0000 (UTC) From: Jacopo Mondi To: m.chehab@samsung.com, hverkuil@xs4all.nl, sakari.ailus@linux.intel.com Cc: Jacopo Mondi , linux-media@vger.kernel.org Subject: [PATCH] media: mt9v111: Fix build error with no VIDEO_V4L2_SUBDEV_API Date: Mon, 6 Aug 2018 00:00:37 +0200 Message-Id: <1533506437-9932-1-git-send-email-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.7.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Fixes: aab7ed1c ("media: i2c: Add driver for Aptina MT9V111") Signed-off-by: Jacopo Mondi --- drivers/media/i2c/mt9v111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c index da8f6ab..68fa39f 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;