Skip to content

Commit 5eff363

Browse files
committed
Revert "mtd_blkdevs: don't scan partitions for plain mtdblock"
This reverts commit 776b54e. Looks like a last minute edit snuck into this patch, and as a result, it doesn't even compile. Revert the change for now. Signed-off-by: Jens Axboe <[email protected]>
1 parent e6a59aa commit 5eff363

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/mtd/mtd_blkdevs.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
346346
gd->minors = 1 << tr->part_bits;
347347
gd->fops = &mtd_block_ops;
348348

349-
if (tr->part_bits) {
349+
if (tr->part_bits)
350350
if (new->devnum < 26)
351351
snprintf(gd->disk_name, sizeof(gd->disk_name),
352352
"%s%c", tr->name, 'a' + new->devnum);
@@ -355,11 +355,9 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
355355
"%s%c%c", tr->name,
356356
'a' - 1 + new->devnum / 26,
357357
'a' + new->devnum % 26);
358-
} else {
358+
else
359359
snprintf(gd->disk_name, sizeof(gd->disk_name),
360360
"%s%d", tr->name, new->devnum);
361-
gd->flags |= GENHD_FL_NO_PART;
362-
}
363361

364362
set_capacity(gd, ((u64)new->size * tr->blksize) >> 9);
365363

0 commit comments

Comments
 (0)