From e6a8de6124ee4f9b8361dffd593399d5f4b5fc87 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 30 Jul 2025 12:19:09 +0800 Subject: [PATCH] examples: Fix ftl_initialize usage in code and Kconfig follow up kernel side change: https://github.com/apache/nuttx/pull/16793 Signed-off-by: Xiang Xiao --- examples/media/Kconfig | 4 ++-- examples/mtdrwb/mtdrwb_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/media/Kconfig b/examples/media/Kconfig index 8a44cee26dd..84210ce3236 100644 --- a/examples/media/Kconfig +++ b/examples/media/Kconfig @@ -24,7 +24,7 @@ config EXAMPLES_MEDIA MTD drivers need an additional wrapper layer, the FTL wrapper must first be used to convert the MTD driver to a block device: - int ret = ftl_initialize(, mtd); + int ret = ftl_initialize(/dev/mtdblock, mtd); ret = bchdev_register(/dev/mtdblock, , false); @@ -45,7 +45,7 @@ config EXAMPLES_MEDIA_DEVPATH MTD drivers need an additional wrapper layer, the FTL wrapper must first be used to convert the MTD driver to a block device: - int ret = ftl_initialize(, mtd); + int ret = ftl_initialize(/dev/mtdblock, mtd); ret = bchdev_register(/dev/mtdblock, , false); diff --git a/examples/mtdrwb/mtdrwb_main.c b/examples/mtdrwb/mtdrwb_main.c index 1ebbe44f5b3..2c6388f95ae 100644 --- a/examples/mtdrwb/mtdrwb_main.c +++ b/examples/mtdrwb/mtdrwb_main.c @@ -180,7 +180,7 @@ int main(int argc, FAR char *argv[]) * interesting. */ - ret = ftl_initialize(0, mtdrwb); + ret = ftl_initialize("/dev/mtdblock0", mtdrwb, 0); if (ret < 0) { printf("ERROR: ftl_initialize /dev/mtdblock0 failed: %d\n", ret);