mtd:use part->name as partition name when CONFIG_MTD_PARTITION_NAMES set
Signed-off-by: guohao15 <guohao15@xiaomi.com>
This commit is contained in:
parent
b3e511c5a8
commit
c812007f8c
|
@ -909,8 +909,11 @@ FAR struct mtd_dev_s *mtd_partition(FAR struct mtd_dev_s *mtd,
|
|||
#ifdef CONFIG_MTD_BYTE_WRITE
|
||||
part->child.write = mtd->write ? part_write : NULL;
|
||||
#endif
|
||||
#ifdef CONFIG_MTD_PARTITION_NAMES
|
||||
part->child.name = part->name;
|
||||
#else
|
||||
part->child.name = "part";
|
||||
|
||||
#endif
|
||||
part->parent = mtd;
|
||||
part->firstblock = erasestart * part->blkpererase;
|
||||
part->geo.neraseblocks = eraseend - erasestart;
|
||||
|
|
Loading…
Reference in New Issue