diff mbox series

[U-Boot] imx: serial_mxc: use CONFIG_IS_ENABLED instead of ifdef

Message ID 20190220040723.27182-1-aford173@gmail.com
State Accepted
Commit e434b414fbaf17e1ed8f2aea3086562627ac906f
Delegated to: Stefano Babic
Headers show
Series [U-Boot] imx: serial_mxc: use CONFIG_IS_ENABLED instead of ifdef | expand

Commit Message

Adam Ford Feb. 20, 2019, 4:07 a.m. UTC
Kconfig allows boards to configured with DM_SERIAL and still
have SPL_DM_SERIAL disabled.  This patch changes the ifdef's
to CONFIG_IS_ENABLED to allow the modes to differ between
SPL and U-Boot.

Signed-off-by: Adam Ford <aford173@gmail.com>

Comments

Simon Glass Feb. 21, 2019, 2:47 a.m. UTC | #1
On Tue, 19 Feb 2019 at 21:07, Adam Ford <aford173@gmail.com> wrote:
>
> Kconfig allows boards to configured with DM_SERIAL and still
> have SPL_DM_SERIAL disabled.  This patch changes the ifdef's
> to CONFIG_IS_ENABLED to allow the modes to differ between
> SPL and U-Boot.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index df35ac9114..476df25805 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -178,7 +178,7 @@  static void _mxc_serial_setbrg(struct mxc_uart *base, unsigned long clk,
 	writel(UCR1_UARTEN, &base->cr1);
 }
 
-#ifndef CONFIG_DM_SERIAL
+#if !CONFIG_IS_ENABLED(DM_SERIAL)
 
 #ifndef CONFIG_MXC_UART_BASE
 #error "define CONFIG_MXC_UART_BASE to use the MXC UART driver"
@@ -260,7 +260,7 @@  __weak struct serial_device *default_serial_console(void)
 }
 #endif
 
-#ifdef CONFIG_DM_SERIAL
+#if CONFIG_IS_ENABLED(DM_SERIAL)
 
 int mxc_serial_setbrg(struct udevice *dev, int baudrate)
 {