From ed10984e065eab1dd5cf26f1a22022796d6dc435 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 17 Mar 2021 08:04:59 +0900 Subject: [PATCH] boards/arm/sama5/sama5d4-ek/src/sam_at25.c: CONFIG_BCH --- boards/arm/sama5/sama5d4-ek/src/sam_at25.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_at25.c b/boards/arm/sama5/sama5d4-ek/src/sam_at25.c index 362f5254d0..16441543c0 100644 --- a/boards/arm/sama5/sama5d4-ek/src/sam_at25.c +++ b/boards/arm/sama5/sama5d4-ek/src/sam_at25.c @@ -76,8 +76,10 @@ int sam_at25_automount(int minor) FAR struct spi_dev_s *spi; FAR struct mtd_dev_s *mtd; #ifdef CONFIG_SAMA5D4EK_AT25_CHARDEV +#if defined(CONFIG_BCH) char blockdev[18]; char chardev[12]; +#endif /* defined(CONFIG_BCH) */ #endif static bool initialized = false; int ret; @@ -127,6 +129,7 @@ int sam_at25_automount(int minor) return ret; } +#if defined(CONFIG_BCH) /* Use the minor number to create device paths */ snprintf(blockdev, 18, "/dev/mtdblock%d", minor); @@ -140,6 +143,7 @@ int sam_at25_automount(int minor) ferr("ERROR: bchdev_register %s failed: %d\n", chardev, ret); return ret; } +#endif /* defined(CONFIG_BCH) */ #elif defined(CONFIG_SAMA5D4EK_AT25_NXFFS) /* Initialize to provide NXFFS on the MTD interface */