aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdblock_ro.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@openedhand.com>2006-10-27 04:09:33 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-11-28 17:27:47 -0500
commit191876729901d0c8dab8a331f9a1e4b73a56457b (patch)
tree1e25eb24ac84c09b0300e32eea55b33adc567015 /drivers/mtd/mtdblock_ro.c
parent90afffc8bd79d130b58acd18f972ce4e00b8e20f (diff)
[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>
Diffstat (limited to 'drivers/mtd/mtdblock_ro.c')
-rw-r--r--drivers/mtd/mtdblock_ro.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c
index 29563ed258a4..642ccc66f283 100644
--- a/drivers/mtd/mtdblock_ro.c
+++ b/drivers/mtd/mtdblock_ro.c
@@ -42,7 +42,7 @@ static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
42 42
43 dev->mtd = mtd; 43 dev->mtd = mtd;
44 dev->devnum = mtd->index; 44 dev->devnum = mtd->index;
45 dev->blksize = 512; 45
46 dev->size = mtd->size >> 9; 46 dev->size = mtd->size >> 9;
47 dev->tr = tr; 47 dev->tr = tr;
48 dev->readonly = 1; 48 dev->readonly = 1;
@@ -60,6 +60,7 @@ static struct mtd_blktrans_ops mtdblock_tr = {
60 .name = "mtdblock", 60 .name = "mtdblock",
61 .major = 31, 61 .major = 31,
62 .part_bits = 0, 62 .part_bits = 0,
63 .blksize = 512,
63 .readsect = mtdblock_readsect, 64 .readsect = mtdblock_readsect,
64 .writesect = mtdblock_writesect, 65 .writesect = mtdblock_writesect,
65 .add_mtd = mtdblock_add_mtd, 66 .add_mtd = mtdblock_add_mtd,