You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by da...@apache.org on 2021/03/03 21:48:27 UTC
[incubator-nuttx] 01/02: mtd/progmem: Let MTD_PROGMEM depend on
ARCH_HAVE_PROGMEM
This is an automated email from the ASF dual-hosted git repository.
davids5 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 0aa78ccc814bacc4e7167329433d878e906ceab0
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Mar 1 23:02:18 2021 +0800
mtd/progmem: Let MTD_PROGMEM depend on ARCH_HAVE_PROGMEM
and remove the reference of CONFIG_ARCH_HAVE_PROGMEM from code
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
Change-Id: I89a73f138d54718ee8bc9345958675d7a2a34ba8
---
drivers/mtd/Kconfig | 1 +
drivers/mtd/mtd_progmem.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 027689e..986f740 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 8308a7f..ab722ab 100644
--- a/drivers/mtd/mtd_progmem.c
+++ b/drivers/mtd/mtd_progmem.c
@@ -49,7 +49,7 @@
#include <nuttx/fs/ioctl.h>
#include <nuttx/mtd/mtd.h>
-#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 */