diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index 39cb2d191d..2823487b27 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -540,12 +540,6 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) cmd = MTDIOC_FLUSH; } - else if (cmd == BIOC_PARTINFO) - { - /* Change the BIOC_PARTINFO command to the MTDIOC_PARTINFO command. */ - - cmd = MTDIOC_PARTINFO; - } /* No other block driver ioctl commands are not recognized by this * driver. Other possible MTD driver ioctl commands are passed through diff --git a/drivers/mtd/mtd_partition.c b/drivers/mtd/mtd_partition.c index d0d5994aef..b71722d985 100644 --- a/drivers/mtd/mtd_partition.c +++ b/drivers/mtd/mtd_partition.c @@ -414,7 +414,7 @@ static int part_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) } break; - case MTDIOC_PARTINFO: + case BIOC_PARTINFO: { FAR struct partition_info_s *info = (FAR struct partition_info_s *)arg; diff --git a/include/nuttx/mtd/mtd.h b/include/nuttx/mtd/mtd.h index 2b95bd13f4..2a87d5d474 100644 --- a/include/nuttx/mtd/mtd.h +++ b/include/nuttx/mtd/mtd.h @@ -40,6 +40,12 @@ /* Ioctl commands */ +/* Note, the following ioctl existed in the past and was removed: + * #define MTDIOC_PARTINFO _MTDIOC(0x000b) + * try to avoid adding a new ioctl with the same ioctl number and + * replace with BIOC_PARTINFO instead. + */ + #define MTDIOC_GEOMETRY _MTDIOC(0x0001) /* IN: Pointer to write-able struct * mtd_geometry_s in which to receive * receive geometry data (see mtd.h) @@ -74,12 +80,6 @@ #define MTDIOC_ERASESTATE _MTDIOC(0x000a) /* IN: Pointer to uint8_t * OUT: Byte value that represents the * erased state of the MTD cell */ -#define MTDIOC_PARTINFO _MTDIOC(0x000b) /* IN: Pointer to writable struct - * partition_info_s in which to - * receive partition information data - * OUT: Partition information structure - * populated with data from the MTD - * partition */ /* Macros to hide implementation */