From cbd8fa31d1cc8a102dedacd0f3e8b7b54dab029f Mon Sep 17 00:00:00 2001 From: Michael Jung Date: Mon, 5 Feb 2018 06:35:40 -0600 Subject: [PATCH] configs/stm32f429i-disco: Separate SPI4 from MTD init. I was trying to attach a non-MTD peripheral to an STM32F429I Discovery Board's SPI4 port and was hitting compilation problems, since CONFIG_MTD and thus 'struct mtd_geometry_s' was not defined. This patch separates SPI4 initialization logic from MTD initialization logic. --- configs/stm32f429i-disco/src/stm32_bringup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/stm32f429i-disco/src/stm32_bringup.c b/configs/stm32f429i-disco/src/stm32_bringup.c index 821ddeb199..3ec0651fe9 100644 --- a/configs/stm32f429i-disco/src/stm32_bringup.c +++ b/configs/stm32f429i-disco/src/stm32_bringup.c @@ -103,6 +103,8 @@ int stm32_bringup(void) { #if defined(CONFIG_STM32_SPI4) FAR struct spi_dev_s *spi; +#endif +#if defined(CONFIG_MTD) FAR struct mtd_dev_s *mtd; FAR struct mtd_geometry_s geo; #endif