From patchwork Tue Jan 26 15:53:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8124341 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D469FBEEE5 for ; Tue, 26 Jan 2016 15:54:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3F442026C for ; Tue, 26 Jan 2016 15:54:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DBCA62025B for ; Tue, 26 Jan 2016 15:54:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934695AbcAZPyW (ORCPT ); Tue, 26 Jan 2016 10:54:22 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:54684 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932190AbcAZPyV (ORCPT ); Tue, 26 Jan 2016 10:54:21 -0500 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0MPuba-1aRvQS2I7e-004yYE; Tue, 26 Jan 2016 16:53:42 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: linux-arm-kernel@lists.infradead.org, Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/7] [media] em28xx: add MEDIA_TUNER dependency Date: Tue, 26 Jan 2016 16:53:38 +0100 Message-ID: <6929423.KuNZKsBgHV@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160126123308.6d59d373@recife.lan> References: <1453817424-3080054-1-git-send-email-arnd@arndb.de> <1453817424-3080054-6-git-send-email-arnd@arndb.de> <20160126123308.6d59d373@recife.lan> MIME-Version: 1.0 X-Provags-ID: V03:K0:Syu7u2NOCTCoxjJFERZg3zNzVA/514NrgmEUl3ey88rlfZ2wcsW jwpBFhFNDnbUee4DG0vgsZ0tFjyoROwMzFKjwIFwUJCHnd5GUV8qE5+f5t7HVZHQhuzPJgk 5lzwchyldKEdrKsbIHOk9dVM/ws9mY+X+GDe9kZCyGA6DSI8sS3Qybb8CxZbS53SanQ1K4y sOcijcqDntdB6L55nTiAA== X-UI-Out-Filterresults: notjunk:1; V01:K0:3X6x6CeNH+E=:Ysbuc71TKj+cytZr/Mw54n 9oYPO04rxgFjJbiQyEH8HbdcR9WTaNh3N+L0eQmvGgm3SDvjjV+5c8Tckq4g/+Q1dOZshUHiF eldVMgTmxI/kvKWYgf8xizAw+TeGKlMWWj3tryNIN4nLk2vFzRbZnDH5lmdalPbQxrqqe8Tg4 JnZQFvf9SD1S1UB+ZM3q3r3+GTHyNjHDVcdXSE8ZC1F5G5g/sU5kPkD5ETfkkQ1FAY9CfhDxY diQtcNe5IOdCHDJeNah2ILQN91owU+tnpyLK734MVWmMW5AvRMjch+lcGJZMAZLOYFRTMo/Jd z6s/o+W/SOKlfHEmGJ1xPx+h7HwD7Mmw1eG+DZsttuX6gWRz9kHgefSADyQ6bG5NPQ8hJf2f1 kk6bqhNbFt/6aJ/FfC6YSxZ3DwK/myunz7VIE1YTPWxH0l17gwJ+f08bUdNBytPhUmBlaCKtP 6TtBk8vkHD6QMwKWVhJKRO56NKA3MYqd750jzaPtSlket1P7Qi6Sj3k+em8ySZyLn+dXtFaeW 6lMMUGO7+afXgbOSPBmmdT6N1I1P2WCGd+XZZ2wuEGCLrRyY7OXWcNIL7Ql7yDBSJGkG8Tk6L Cz6kSwvmO+BYUE4W1VIAuyVXcFcTaxjRaFlVbXgHaJ1nW8KRcRUtXG9AfeiwXiaEutSn56M9p pEhQ9f3lhz3avSx4HxTInhZgy0QmHczExQJbm13Gbd6ykUhnN9/ZGVYC7FKzHtCzFG+7aaeW6 O5pAI2IJWrMt47YP Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tuesday 26 January 2016 12:33:08 Mauro Carvalho Chehab wrote: > Em Tue, 26 Jan 2016 15:10:00 +0100 > Arnd Bergmann escreveu: > > > em28xx selects VIDEO_TUNER, which has a dependency on MEDIA_TUNER, > > so we get a Kconfig warning if that is disabled: > > > > warning: (VIDEO_PVRUSB2 && VIDEO_USBVISION && VIDEO_GO7007 && VIDEO_AU0828_V4L2 && VIDEO_CX231XX && VIDEO_TM6000 && VIDEO_EM28XX && VIDEO_IVTV && VIDEO_MXB && VIDEO_CX18 && VIDEO_CX23885 && VIDEO_CX88 && VIDEO_BT848 && VIDEO_SAA7134 && VIDEO_SAA7164) selects VIDEO_TUNER which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_TUNER) > > This warning is bogus, as it is OK to select VIDEO_TUNER even if MEDIA_TUNER > is not defined. > > See how MEDIA_TUNER is defined: > > > config MEDIA_TUNER > tristate > depends on (MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT) && I2C > default y > select MEDIA_TUNER_XC2028 if MEDIA_SUBDRV_AUTOSELECT > select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT > select MEDIA_TUNER_XC4000 if MEDIA_SUBDRV_AUTOSELECT > select MEDIA_TUNER_MT20XX if MEDIA_SUBDRV_AUTOSELECT > select MEDIA_TUNER_TDA8290 if MEDIA_SUBDRV_AUTOSELECT > select MEDIA_TUNER_TEA5761 if MEDIA_SUBDRV_AUTOSELECT && MEDIA_RADIO_SUPPORT > select MEDIA_TUNER_TEA5767 if MEDIA_SUBDRV_AUTOSELECT && MEDIA_RADIO_SUPPORT > select MEDIA_TUNER_SIMPLE if MEDIA_SUBDRV_AUTOSELECT > select MEDIA_TUNER_TDA9887 if MEDIA_SUBDRV_AUTOSELECT > select MEDIA_TUNER_MC44S803 if MEDIA_SUBDRV_AUTOSELECT > > MEDIA_TUNER is just one of the media Kconfig workarounds to its limitation of > not allowing to select a device that has dependencies. It is true if the user > selected either TV or radio media devices. It works together with > MEDIA_SUBDRV_AUTOSELECT. When both are enabled, it selects all > media tuners. That makes easier for end users to not need to worry about > manually selecting the needed tuners. > > Advanced users may, instead, manually select the media tuner that his > hardware needs. In such case, it doesn't matter if MEDIA_TUNER > is enabled or not. > > As this is due to a Kconfig limitation, I've no idea how to fix or get > hid of it, but making em28xx dependent of MEDIA_TUNER is wrong. I don't understand what limitation you see here. The definition of the VIDEO_TUNER symbol is an empty 'tristate' symbol with a dependency on MEDIA_TUNER to ensure we get a warning if MEDIA_TUNER is not enabled, and to ensure it is set to 'm' if MEDIA_TUNER=m and a "bool" driver selects VIDEO_TUNER. You are saying that the first one is not correct, so I assume we still need the second meaning. We could probably do that like the patch below (untested) that makes the intention much more explicit. Arnd --- 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/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig index 9beece00869b..1050bdf1848f 100644 --- a/drivers/media/v4l2-core/Kconfig +++ b/drivers/media/v4l2-core/Kconfig @@ -37,7 +37,11 @@ config VIDEO_PCI_SKELETON # Used by drivers that need tuner.ko config VIDEO_TUNER tristate - depends on MEDIA_TUNER + +config VIDEO_TUNER_MODULE + tristate # must not be built-in if MEDIA_TUNER=m because of I2C + default y if VIDEO_TUNER=y || MEDIA_TUNER=y + default m if VIDEO_TUNER=m # Used by drivers that need v4l2-mem2mem.ko config V4L2_MEM2MEM_DEV diff --git a/drivers/media/v4l2-core/Makefile b/drivers/media/v4l2-core/Makefile index 1dc8bba2b198..971af6398d6d 100644 --- a/drivers/media/v4l2-core/Makefile +++ b/drivers/media/v4l2-core/Makefile @@ -21,7 +21,7 @@ obj-$(CONFIG_VIDEO_V4L2) += videodev.o obj-$(CONFIG_VIDEO_V4L2) += v4l2-common.o obj-$(CONFIG_VIDEO_V4L2) += v4l2-dv-timings.o -obj-$(CONFIG_VIDEO_TUNER) += tuner.o +obj-$(CONFIG_VIDEO_TUNER_MODULE) += tuner.o obj-$(CONFIG_V4L2_MEM2MEM_DEV) += v4l2-mem2mem.o