From patchwork Wed Jan 25 09:32:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 9536599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 27C80601D7 for ; Wed, 25 Jan 2017 09:32:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 129E6205F6 for ; Wed, 25 Jan 2017 09:32:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06BA426E94; Wed, 25 Jan 2017 09:32:41 +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=-1.9 required=2.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 86AF3205F6 for ; Wed, 25 Jan 2017 09:32:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cWJwU-0005En-VU; Wed, 25 Jan 2017 09:32:38 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cWJwS-0005D8-A6 for linux-mediatek@lists.infradead.org; Wed, 25 Jan 2017 09:32:38 +0000 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 E69C4AB5D; Wed, 25 Jan 2017 09:32:13 +0000 (UTC) Date: Wed, 25 Jan 2017 10:32:09 +0100 From: Jean Delvare To: linux-gpio@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH] pinctrl: mediatek: Use real dependencies Message-ID: <20170125103209.1d97b0bd@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170125_013236_594658_F0884DE9 X-CRM114-Status: UNSURE ( 6.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matthias Brugger , Biao Huang , Linus Walleij , Andreas =?UTF-8?B?RsOkcmJlcg==?= , James Liao Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Do not hide pinctrl drivers for Mediatek platforms using conditionals. Doing so actually leaves the symbols present (but always disabled) on all other platforms, which is confusing and inefficient. Better use real dependencies so that the symbols do not exist at all on platforms where they are not relevant. Signed-off-by: Jean Delvare Reported-by: Andreas Färber Cc: Linus Walleij Cc: Matthias Brugger Acked-by: John Crispin Reviewed-by: Matthias Brugger --- drivers/pinctrl/mediatek/Kconfig | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) --- linux-4.10-rc4.orig/drivers/pinctrl/mediatek/Kconfig 2017-01-01 23:31:53.000000000 +0100 +++ linux-4.10-rc4/drivers/pinctrl/mediatek/Kconfig 2017-01-25 10:29:00.465436987 +0100 @@ -10,25 +10,29 @@ config PINCTRL_MTK # For ARMv7 SoCs config PINCTRL_MT2701 - bool "Mediatek MT2701 pin control" if COMPILE_TEST && !MACH_MT2701 + bool "Mediatek MT2701 pin control" + depends on MACH_MT2701 || COMPILE_TEST depends on OF default MACH_MT2701 select PINCTRL_MTK config PINCTRL_MT7623 - bool "Mediatek MT7623 pin control" if COMPILE_TEST && !MACH_MT7623 + bool "Mediatek MT7623 pin control" + depends on MACH_MT7623 || COMPILE_TEST depends on OF default MACH_MT7623 select PINCTRL_MTK_COMMON config PINCTRL_MT8135 - bool "Mediatek MT8135 pin control" if COMPILE_TEST && !MACH_MT8135 + bool "Mediatek MT8135 pin control" + depends on MACH_MT8135 || COMPILE_TEST depends on OF default MACH_MT8135 select PINCTRL_MTK config PINCTRL_MT8127 - bool "Mediatek MT8127 pin control" if COMPILE_TEST && !MACH_MT8127 + bool "Mediatek MT8127 pin control" + depends on MACH_MT8127 || COMPILE_TEST depends on OF default MACH_MT8127 select PINCTRL_MTK @@ -43,7 +47,8 @@ config PINCTRL_MT8173 # For PMIC config PINCTRL_MT6397 - bool "Mediatek MT6397 pin control" if COMPILE_TEST && !MFD_MT6397 + bool "Mediatek MT6397 pin control" + depends on MFD_MT6397 || COMPILE_TEST depends on OF default MFD_MT6397 select PINCTRL_MTK