Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1471695

[PATCH v2] ARM: imx: use IS_ENABLED() instead of checking for built-in or module

Path csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Javier Martinez Canillas <javier@osg.samsung.com>
Newsgroups linux.kernel
Subject [PATCH v2] ARM: imx: use IS_ENABLED() instead of checking for built-in or module
Date Mon, 29 Aug 2016 12:20:01 +0200
Message-ID <sbrPz-626-3@gated-at.bofh.it> (permalink)
X-Original-To linux-kernel@vger.kernel.org
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 49
Organization linux.* mail to news gateway
X-Original-Cc Javier Martinez Canillas <javier@osg.samsung.com>, Fabio Estevam <fabio.estevam@nxp.com>, Sascha Hauer <kernel@pengutronix.de>, linux-arm-kernel@lists.infradead.org, Russell King <linux@armlinux.org.uk>, Shawn Guo <shawnguo@kernel.org>
X-Original-Date Mon, 29 Aug 2016 12:12:04 +0200
X-Original-Message-ID <1472465524-2374-1-git-send-email-javier@osg.samsung.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1471695

Show key headers only | View raw


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 <javier@osg.samsung.com>

---

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,
 };
-- 
2.7.4

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] ARM: imx: use IS_ENABLED() instead of checking for built-in or module Javier Martinez Canillas <javier@osg.samsung.com> - 2016-08-29 12:20 +0200
  Re: [PATCH v2] ARM: imx: use IS_ENABLED() instead of checking for  built-in or module Shawn Guo <shawnguo@kernel.org> - 2016-08-29 16:30 +0200

csiph-web