File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
346
346
gd -> minors = 1 << tr -> part_bits ;
347
347
gd -> fops = & mtd_block_ops ;
348
348
349
- if (tr -> part_bits )
349
+ if (tr -> part_bits ) {
350
350
if (new -> devnum < 26 )
351
351
snprintf (gd -> disk_name , sizeof (gd -> disk_name ),
352
352
"%s%c" , tr -> name , 'a' + new -> devnum );
@@ -355,9 +355,11 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
355
355
"%s%c%c" , tr -> name ,
356
356
'a' - 1 + new -> devnum / 26 ,
357
357
'a' + new -> devnum % 26 );
358
- else
358
+ } else {
359
359
snprintf (gd -> disk_name , sizeof (gd -> disk_name ),
360
360
"%s%d" , tr -> name , new -> devnum );
361
+ gd -> flags |= GENHD_FL_NO_PART ;
362
+ }
361
363
362
364
set_capacity (gd , ((u64 )new -> size * tr -> blksize ) >> 9 );
363
365
You can’t perform that action at this time.
0 commit comments