diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 027689eaf9..986f740ac5 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -130,6 +130,7 @@ endif # MTD_READAHEAD config MTD_PROGMEM bool "Enable on-chip program FLASH MTD device" default n + depends on ARCH_HAVE_PROGMEM ---help--- Enable to support an MTD device that supports the on-chip FLASH using the interfaces defined in include/nuttx/progmem. Those diff --git a/drivers/mtd/mtd_progmem.c b/drivers/mtd/mtd_progmem.c index 8308a7fe0f..ab722ab5c7 100644 --- a/drivers/mtd/mtd_progmem.c +++ b/drivers/mtd/mtd_progmem.c @@ -49,7 +49,7 @@ #include #include -#ifdef CONFIG_ARCH_HAVE_PROGMEM +#ifdef CONFIG_MTD_PROGMEM /**************************************************************************** * Private Types @@ -422,4 +422,4 @@ FAR struct mtd_dev_s *progmem_initialize(void) return (FAR struct mtd_dev_s *)priv; } -#endif /* CONFIG_ARCH_HAVE_PROGMEM */ +#endif /* CONFIG_MTD_PROGMEM */