From patchwork Mon Aug 29 10:12:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 9303423 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 375AE607F0 for ; Mon, 29 Aug 2016 10:14:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2776728799 for ; Mon, 29 Aug 2016 10:14:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BE63287B6; Mon, 29 Aug 2016 10:14:02 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BE24028799 for ; Mon, 29 Aug 2016 10:14:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1beJYX-0006WO-RQ; Mon, 29 Aug 2016 10:12:41 +0000 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49] helo=s-opensource.com) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1beJYU-0006T1-5p for linux-arm-kernel@lists.infradead.org; Mon, 29 Aug 2016 10:12:39 +0000 Received: from localhost (localhost [127.0.0.1]) by s-opensource.com (Postfix) with ESMTP id 068ECA0E77; Mon, 29 Aug 2016 10:12:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osg.samsung.com Received: from s-opensource.com ([127.0.0.1]) by localhost (s-opensource.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8hZBj60EH6Bg; Mon, 29 Aug 2016 10:12:19 +0000 (UTC) Received: from minerva.sisa.samsung.com (62.57.161.25.dyn.user.ono.com [62.57.161.25]) by s-opensource.com (Postfix) with ESMTPSA id 10D1AA0DFA; Mon, 29 Aug 2016 10:12:16 +0000 (UTC) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH v2] ARM: imx: use IS_ENABLED() instead of checking for built-in or module Date: Mon, 29 Aug 2016 12:12:04 +0200 Message-Id: <1472465524-2374-1-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160829_031238_278293_D7357218 X-CRM114-Status: GOOD ( 10.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , Javier Martinez Canillas , Sascha Hauer , Fabio Estevam , Shawn Guo , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas --- Changes in v2: - Remove duplicated Signed-off-by tag. arch/arm/mach-imx/mach-kzm_arm11_01.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c index 31df4361996f..e277d9c230e5 100644 --- a/arch/arm/mach-imx/mach-kzm_arm11_01.c +++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c @@ -63,7 +63,7 @@ */ #define KZM_ARM11_16550 (MX31_CS4_BASE_ADDR + 0x1050) -#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_8250) /* * KZM-ARM11-01 has an external UART on FPGA */ @@ -141,7 +141,7 @@ static inline int kzm_init_ext_uart(void) /* * SMSC LAN9118 */ -#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) +#if IS_ENABLED(CONFIG_SMSC911X) static struct smsc911x_platform_config kzm_smsc9118_config = { .phy_interface = PHY_INTERFACE_MODE_MII, .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, @@ -201,7 +201,7 @@ static inline int kzm_init_smsc9118(void) } #endif -#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_IMX) static const struct imxuart_platform_data uart_pdata __initconst = { .flags = IMXUART_HAVE_RTSCTS, };