From patchwork Thu Feb 19 12:11:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 28321 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1YOPwr-0000wp-80; Thu, 19 Feb 2015 13:11:17 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-8) with esmtp id 1YOPwo-0007uZ-lU; Thu, 19 Feb 2015 13:11:16 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752920AbbBSMLM (ORCPT + 1 other); Thu, 19 Feb 2015 07:11:12 -0500 Received: from cantor2.suse.de ([195.135.220.15]:40870 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752695AbbBSMLL (ORCPT ); Thu, 19 Feb 2015 07:11:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 85741AD88; Thu, 19 Feb 2015 12:11:08 +0000 (UTC) Received: by sepie.suse.cz (Postfix, from userid 10020) id A6D0040BD6; Thu, 19 Feb 2015 13:11:07 +0100 (CET) Date: Thu, 19 Feb 2015 13:11:07 +0100 From: Michal Marek To: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, Antti Palosaari , Peter Senna Tschudin , Mauro Carvalho Chehab , Trent Piepho , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, "Yann E. MORIN" , linux-media@vger.kernel.org Subject: Re: [PATCH] [media] [kbuild] Add and use IS_REACHABLE macro Message-ID: <20150219121107.GA19684@sepie.suse.cz> References: <6116702.rrbrOqQ26P@wuerfel> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6116702.rrbrOqQ26P@wuerfel> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.2.19.120619 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, REFERENCES 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' On 2015-02-18 18:12, Arnd Bergmann wrote: > In the media drivers, the v4l2 core knows about all submodules > and calls into them from a common function. However this cannot > work if the modules that get called are loadable and the > core is built-in. In that case we get > > drivers/built-in.o: In function `set_type': > drivers/media/v4l2-core/tuner-core.c:301: undefined reference to `tea5767_attach' > drivers/media/v4l2-core/tuner-core.c:307: undefined reference to `tea5761_attach' > drivers/media/v4l2-core/tuner-core.c:349: undefined reference to `tda9887_attach' > drivers/media/v4l2-core/tuner-core.c:405: undefined reference to `xc4000_attach' > [...] > Ideally Kconfig would be used to avoid the case of a broken dependency, > or the code restructured in a way to turn around the dependency, but either > way would require much larger changes here. What can be done without extending kbuild is to accept CONFIG_VIDEO_TUNER=y and CONFIG_MEDIA_TUNER_FOO=m, but build both into the kernel, e.g. Actually, I have hard time coming up with a kconfig syntactic sugar to express such dependency. If I understand it correctly, the valid configurations in this case are MEDIA_TUNER_TEA5767 n m y VIDEO_TUNER n x x x m x x x y x x I.e. only VIDEO_TUNER=y and MEDIA_TUNER_TEA5767=m is incorrect, isn't it? Thanks, Michal Acked-by: Michal Marek [kconfig] --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/tuners/Kconfig b/drivers/media/tuners/Kconfig index 42e5a01..d2c7e89 100644 --- a/drivers/media/tuners/Kconfig +++ b/drivers/media/tuners/Kconfig @@ -71,6 +71,11 @@ config MEDIA_TUNER_TEA5767 help Say Y here to include support for the Philips TEA5767 radio tuner. +config MEDIA_TUNER_TEA5767_BUILD + tristate + default VIDEO_TUNER || MEDIA_TUNER_TEA5767 + depends on MEDIA_TUNER_TEA5767!=n + config MEDIA_TUNER_MSI001 tristate "Mirics MSi001" depends on MEDIA_SUPPORT && SPI && VIDEO_V4L2