STM32: Fix some incorrectly placed conditional logic
This commit is contained in:
parent
33bcb5dbca
commit
1c39b67e32
@ -2610,14 +2610,13 @@ void up_serialinit(void)
|
|||||||
|
|
||||||
(void)uart_register("/dev/ttyS0", &uart_devs[CONSOLE_UART - 1]->dev);
|
(void)uart_register("/dev/ttyS0", &uart_devs[CONSOLE_UART - 1]->dev);
|
||||||
minor = 1;
|
minor = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SERIAL_HAVE_CONSOLE_DMA
|
||||||
/* If we need to re-initialise the console to enable DMA do that here. */
|
/* 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);
|
up_dma_setup(&uart_devs[CONSOLE_UART - 1]->dev);
|
||||||
# endif
|
#endif
|
||||||
#endif /* CONFIG_SERIAL_DISABLE_REORDERING not defined */
|
|
||||||
|
|
||||||
#endif /* CONSOLE_UART > 0 */
|
#endif /* CONSOLE_UART > 0 */
|
||||||
|
|
||||||
/* Register all remaining USARTs */
|
/* Register all remaining USARTs */
|
||||||
|
@ -535,7 +535,7 @@ static inline int ramtron_pagewrite(struct ramtron_dev_s *priv, FAR const uint8_
|
|||||||
|
|
||||||
#ifdef RAMTRON_WRITEWAIT
|
#ifdef RAMTRON_WRITEWAIT
|
||||||
/* Wait for write completion now so we can report any errors to the caller. Thus
|
/* 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);
|
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)
|
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");
|
fvdbg("On RAMTRON devices erasing makes no sense, returning as OK\n");
|
||||||
return (int)nblocks;
|
return (int)nblocks;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user