From patchwork Tue Dec 27 19:47:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 9489841 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 C96C962AB0 for ; Tue, 27 Dec 2016 19:47:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE12D200E7 for ; Tue, 27 Dec 2016 19:47:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A315025F31; Tue, 27 Dec 2016 19:47:17 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 2720125D99 for ; Tue, 27 Dec 2016 19:47:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932375AbcL0TrN (ORCPT ); Tue, 27 Dec 2016 14:47:13 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34624 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933248AbcL0TrI (ORCPT ); Tue, 27 Dec 2016 14:47:08 -0500 Received: by mail-pg0-f67.google.com with SMTP id b1so13279475pgc.1; Tue, 27 Dec 2016 11:47:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=0pToxupR37h6NG7ZNhjJX/8j/hD/7MgsaUmvM+VamJc=; b=H4/de49uSNyJYOSjXkLo3M8rf4J2OH/w4Z5kXN4E0uZPVL0hToE1fMSmRoxBtz0wFf aoj3JdiOUmcm5ngl4EA1pjwENDzNyWUyV3U/gFhfWS6FCSMtpcdXEMSCeBGZJ2gAGZiD Ox6bX3VOUiT4RdOKteKD7x6iAnFG0r/Dt539EFrNHUw//aj6XTrEIuxG22cuxVvPq/Qa IoyLnRtmYowYbsnpWcKkk1yI3YAfWrh6Tq3c1NeSqHsTxjR6HPrLuWfeSIihg460gshl gktve2Sp8SdkQ7wPt8a2uxbh1TglhVFrx5N4djI1QZHqto+PBzotPBrw8KqrWgVReW8E QGGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=0pToxupR37h6NG7ZNhjJX/8j/hD/7MgsaUmvM+VamJc=; b=raaVcX+WEcvGKbZsQWyEDvo/BKeQvXsaDnm5HjWjf3jNIclEJse4CgKupt0WZjAvL8 GmBPTLhkYZAAXIV9avan81sfF+W32TuPzE6Oeo9WHpHqFaNXs9vx+jbDwmQOE4weH/an o9k+JCDXuvZQdPJfQUEFMyoaNR5e4fbtbBrsfQoHmiNRRMoiMo1JzNZv4W+hQqi/OOM/ CpyUM89oSyEPiVuEA2/p99Lx784Daguo6UysgMa81/KFJbz/sPonuQ8Ni70sXnoP42ei xN7ul+BPQyPGPfGS6PlCqCtKl/p1NO9Nu20bM+lU1js5ICAiK8UAGV4GnNICPjBW9/vY ZOpg== X-Gm-Message-State: AIkVDXKtOth6h95xJ0TnwkuLRWS3Nfz2bZoCSoseMzBkds8bs3fhO4P2RpiSRpbz5rOnyg== X-Received: by 10.84.129.35 with SMTP id 32mr70354201plb.179.1482868027222; Tue, 27 Dec 2016 11:47:07 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1311:463:7a72:f2fa:4f4e]) by smtp.gmail.com with ESMTPSA id e84sm46347590pfl.79.2016.12.27.11.47.06 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 27 Dec 2016 11:47:06 -0800 (PST) Date: Tue, 27 Dec 2016 11:47:04 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Andrew Duggan , Christopher Heiny , Benjamin Tissoires , Nick Dyer , Guenter Roeck , Lyude Paul , linux-kernel@vger.kernel.org Subject: [PATCH] Input: synaptics-rmi4 - use Kconfig "if" to express dependency Message-ID: <20161227194704.GA19182@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no need to repeat "depends on RMI4_CORE" on every bit of RMI4 support, we can guard all of them at once with "if RMI4_CORE". Also use tabs for F03 indentation. Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck --- This depends on RMI4 F03 build fix I sent a few minutes ago. drivers/input/rmi4/Kconfig | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig index 8993983..78a78b9 100644 --- a/drivers/input/rmi4/Kconfig +++ b/drivers/input/rmi4/Kconfig @@ -9,9 +9,11 @@ config RMI4_CORE If unsure, say Y. +if RMI4_CORE + config RMI4_I2C tristate "RMI4 I2C Support" - depends on RMI4_CORE && I2C + depends on I2C help Say Y here if you want to support RMI4 devices connected to an I2C bus. @@ -20,7 +22,7 @@ config RMI4_I2C config RMI4_SPI tristate "RMI4 SPI Support" - depends on RMI4_CORE && SPI + depends on SPI help Say Y here if you want to support RMI4 devices connected to a SPI bus. @@ -29,7 +31,7 @@ config RMI4_SPI config RMI4_SMB tristate "RMI4 SMB Support" - depends on RMI4_CORE && I2C + depends on I2C help Say Y here if you want to support RMI4 devices connected to an SMB bus. @@ -40,23 +42,20 @@ config RMI4_SMB called rmi_smbus. config RMI4_F03 - bool "RMI4 Function 03 (PS2 Guest)" - depends on RMI4_CORE + bool "RMI4 Function 03 (PS2 Guest)" depends on SERIO=y || RMI4_CORE=SERIO - help - Say Y here if you want to add support for RMI4 function 03. + help + Say Y here if you want to add support for RMI4 function 03. - Function 03 provides PS2 guest support for RMI4 devices. This - includes support for TrackPoints on TouchPads. + Function 03 provides PS2 guest support for RMI4 devices. This + includes support for TrackPoints on TouchPads. config RMI4_2D_SENSOR bool - depends on RMI4_CORE config RMI4_F11 bool "RMI4 Function 11 (2D pointing)" select RMI4_2D_SENSOR - depends on RMI4_CORE help Say Y here if you want to add support for RMI4 function 11. @@ -67,7 +66,6 @@ config RMI4_F11 config RMI4_F12 bool "RMI4 Function 12 (2D pointing)" select RMI4_2D_SENSOR - depends on RMI4_CORE help Say Y here if you want to add support for RMI4 function 12. @@ -77,7 +75,6 @@ config RMI4_F12 config RMI4_F30 bool "RMI4 Function 30 (GPIO LED)" - depends on RMI4_CORE help Say Y here if you want to add support for RMI4 function 30. @@ -86,7 +83,6 @@ config RMI4_F30 config RMI4_F34 bool "RMI4 Function 34 (Device reflash)" - depends on RMI4_CORE select FW_LOADER help Say Y here if you want to add support for RMI4 function 34. @@ -97,7 +93,6 @@ config RMI4_F34 config RMI4_F54 bool "RMI4 Function 54 (Analog diagnostics)" - depends on RMI4_CORE depends on VIDEO_V4L2=y || (RMI4_CORE=m && VIDEO_V4L2=m) select VIDEOBUF2_VMALLOC select RMI4_F55 @@ -109,9 +104,10 @@ config RMI4_F54 config RMI4_F55 bool "RMI4 Function 55 (Sensor tuning)" - depends on RMI4_CORE help Say Y here if you want to add support for RMI4 function 55 Function 55 provides access to the RMI4 touch sensor tuning mechanism. + +endif # RMI_CORE