From 1c39b67e326efb4e3024eaeb5469924f32477dda Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 26 Dec 2014 12:41:35 -0600 Subject: [PATCH] STM32: Fix some incorrectly placed conditional logic --- arch/arm/src/stm32/stm32_serial.c | 7 +++---- drivers/mtd/ramtron.c | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/src/stm32/stm32_serial.c b/arch/arm/src/stm32/stm32_serial.c index f1c6644f9e..8a7ed09643 100644 --- a/arch/arm/src/stm32/stm32_serial.c +++ b/arch/arm/src/stm32/stm32_serial.c @@ -2610,14 +2610,13 @@ void up_serialinit(void) (void)uart_register("/dev/ttyS0", &uart_devs[CONSOLE_UART - 1]->dev); minor = 1; +#endif +#ifdef SERIAL_HAVE_CONSOLE_DMA /* If we need to re-initialise the console to enable DMA do that here. */ -# ifdef SERIAL_HAVE_CONSOLE_DMA up_dma_setup(&uart_devs[CONSOLE_UART - 1]->dev); -# endif -#endif /* CONFIG_SERIAL_DISABLE_REORDERING not defined */ - +#endif #endif /* CONSOLE_UART > 0 */ /* Register all remaining USARTs */ diff --git a/drivers/mtd/ramtron.c b/drivers/mtd/ramtron.c index 16e8898a41..3c83ce0442 100644 --- a/drivers/mtd/ramtron.c +++ b/drivers/mtd/ramtron.c @@ -535,7 +535,7 @@ static inline int ramtron_pagewrite(struct ramtron_dev_s *priv, FAR const uint8_ #ifdef RAMTRON_WRITEWAIT /* Wait for write completion now so we can report any errors to the caller. Thus - * the caller will know weather or not if the data is on stable storage + * the caller will know whether or not if the data is on stable storage */ return ramtron_waitwritecomplete(priv); @@ -550,7 +550,7 @@ static inline int ramtron_pagewrite(struct ramtron_dev_s *priv, FAR const uint8_ static int ramtron_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks) { - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + fvdbg("startblock: %08lx nblocks: %d\n", (unsigned long)startblock, (int)nblocks); fvdbg("On RAMTRON devices erasing makes no sense, returning as OK\n"); return (int)nblocks; }