From 5ebc472f433736b1b98b2f8e9927e196ee078b9b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 28 Oct 2014 06:42:53 -0600 Subject: [PATCH] STM32 Serial: Don't compile up_earlyserialinit() if USE_EARLYSERIALINIT is not define. Otherwise, a macro definition clobbers the function definition --- arch/arm/src/stm32/stm32_serial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/src/stm32/stm32_serial.c b/arch/arm/src/stm32/stm32_serial.c index f2de1642ebe..f1c6644f9ee 100644 --- a/arch/arm/src/stm32/stm32_serial.c +++ b/arch/arm/src/stm32/stm32_serial.c @@ -2547,6 +2547,7 @@ static int up_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate) * ****************************************************************************/ +#if USE_EARLYSERIALINIT void up_earlyserialinit(void) { #ifdef HAVE_UART @@ -2569,6 +2570,7 @@ void up_earlyserialinit(void) #endif #endif /* HAVE UART */ } +#endif /**************************************************************************** * Name: up_serialinit