diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index 2823487b27..664b9df45f 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -535,10 +535,6 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) #ifdef CONFIG_FTL_WRITEBUFFER rwb_flush(&dev->rwb); #endif - - /* Change the BIOC_FLUSH command to the MTDIOC_FLUSH command. */ - - cmd = MTDIOC_FLUSH; } /* No other block driver ioctl commands are not recognized by this diff --git a/fs/littlefs/lfs_vfs.c b/fs/littlefs/lfs_vfs.c index eb77da0ff2..abc61297b4 100644 --- a/fs/littlefs/lfs_vfs.c +++ b/fs/littlefs/lfs_vfs.c @@ -928,7 +928,7 @@ static int littlefs_sync_block(FAR const struct lfs_config *c) if (INODE_IS_MTD(drv)) { - ret = MTD_IOCTL(drv->u.i_mtd, MTDIOC_FLUSH, 0); + ret = MTD_IOCTL(drv->u.i_mtd, BIOC_FLUSH, 0); } else { diff --git a/include/nuttx/mtd/mtd.h b/include/nuttx/mtd/mtd.h index 2a87d5d474..fe4bf05bb2 100644 --- a/include/nuttx/mtd/mtd.h +++ b/include/nuttx/mtd/mtd.h @@ -41,9 +41,10 @@ /* Ioctl commands */ /* Note, the following ioctl existed in the past and was removed: + * #define MTDIOC_FLUSH _MTDIOC(0x0009) * #define MTDIOC_PARTINFO _MTDIOC(0x000b) * try to avoid adding a new ioctl with the same ioctl number and - * replace with BIOC_PARTINFO instead. + * replace with BIOC_FLUSH and BIOC_PARTINFO instead. */ #define MTDIOC_GEOMETRY _MTDIOC(0x0001) /* IN: Pointer to write-able struct @@ -74,9 +75,6 @@ * OUT: None */ #define MTDIOC_ECCSTATUS _MTDIOC(0x0008) /* IN: Pointer to uint8_t * OUT: ECC status */ -#define MTDIOC_FLUSH _MTDIOC(0x0009) /* IN: None - * OUT: None (ioctl return value provides - * success/failure indication). */ #define MTDIOC_ERASESTATE _MTDIOC(0x000a) /* IN: Pointer to uint8_t * OUT: Byte value that represents the * erased state of the MTD cell */