[MTD] Allow variable block sizes in mtd_blkdevs
Currently, mtd_blkdevs enforces a block size of 512, even if the drivers can seemingly request a different size. This patch fixes mtd_blkdevs so block sizes other than 512 work correctly. Signed-off-by: Richard Purdie <rpurdie@openedhand.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
committed by
David Woodhouse
parent
90afffc8bd
commit
1918767299
@@ -787,7 +787,6 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
|
||||
|
||||
if (scan_header(part) == 0) {
|
||||
part->mbd.size = part->sector_count;
|
||||
part->mbd.blksize = SECTOR_SIZE;
|
||||
part->mbd.tr = tr;
|
||||
part->mbd.devnum = -1;
|
||||
if (!(mtd->flags & MTD_WRITEABLE))
|
||||
@@ -829,6 +828,8 @@ struct mtd_blktrans_ops rfd_ftl_tr = {
|
||||
.name = "rfd",
|
||||
.major = RFD_FTL_MAJOR,
|
||||
.part_bits = PART_BITS,
|
||||
.blksize = SECTOR_SIZE,
|
||||
|
||||
.readsect = rfd_ftl_readsect,
|
||||
.writesect = rfd_ftl_writesect,
|
||||
.getgeo = rfd_ftl_getgeo,
|
||||
|
Reference in New Issue
Block a user