This is an automated email from the ASF dual-hosted git repository.

ligd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 61f4bd522c9338a300122a344847e254bd15f44b
Author: zhaoxingyu1 <[email protected]>
AuthorDate: Fri Nov 15 23:08:41 2024 +0800

    mtd/nvs: rename MTD_BLOCKSIZE_MULTIPLE
    
    rename MTD_BLOCKSIZE_MULTIPLE to
    CONFIG_MTD_CONFIG_BLOCKSIZE_MULTIPLE
    
    Signed-off-by: zhaoxingyu1 <[email protected]>
---
 drivers/mtd/Kconfig         | 2 +-
 drivers/mtd/mtd_config_fs.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index bd120b5d333..84bee7f17b9 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -194,7 +194,7 @@ config MTD_CONFIG_FAIL_SAFE
                This replaces the drivers/mtd/mtd_config, which
                is resilient to power loss.
 
-config MTD_BLOCKSIZE_MULTIPLE
+config MTD_CONFIG_BLOCKSIZE_MULTIPLE
        int "Set NVS blocksize multiple"
        default 1
        depends on MTD_CONFIG_FAIL_SAFE
diff --git a/drivers/mtd/mtd_config_fs.c b/drivers/mtd/mtd_config_fs.c
index 96ee339727a..5b6fb2d5137 100644
--- a/drivers/mtd/mtd_config_fs.c
+++ b/drivers/mtd/mtd_config_fs.c
@@ -581,9 +581,9 @@ static int nvs_flash_erase_block(FAR struct nvs_fs *fs, 
uint32_t addr)
 
   finfo("Erasing addr %" PRIx32 "\n", addr);
   rc = MTD_ERASE(fs->mtd,
-                 CONFIG_MTD_BLOCKSIZE_MULTIPLE *
+                 CONFIG_MTD_CONFIG_BLOCKSIZE_MULTIPLE *
                  (addr >> NVS_ADDR_BLOCK_SHIFT),
-                 CONFIG_MTD_BLOCKSIZE_MULTIPLE);
+                 CONFIG_MTD_CONFIG_BLOCKSIZE_MULTIPLE);
   if (rc < 0)
     {
       ferr("Erasing failed %d\n", rc);
@@ -1210,8 +1210,8 @@ static int nvs_startup(FAR struct nvs_fs *fs)
       return rc;
     }
 
-  fs->blocksize = CONFIG_MTD_BLOCKSIZE_MULTIPLE * geo.erasesize;
-  fs->nblocks   = geo.neraseblocks / CONFIG_MTD_BLOCKSIZE_MULTIPLE;
+  fs->blocksize = CONFIG_MTD_CONFIG_BLOCKSIZE_MULTIPLE * geo.erasesize;
+  fs->nblocks   = geo.neraseblocks / CONFIG_MTD_CONFIG_BLOCKSIZE_MULTIPLE;
   fs->progsize  = geo.blocksize;
 
   size_t ate_size = nvs_ate_size(fs);

Reply via email to