aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/wbuf.c
diff options
context:
space:
mode:
authorJoern Engel <joern@wh.fh-wedel.de>2006-05-22 17:18:05 -0400
committerJoern Engel <joern@wh.fh-wedel.de>2006-05-22 17:18:05 -0400
commit28318776a80bc3261f9af91ef79e6e38bb9f5bec (patch)
tree36ef9144accf19db9d51019aa479807e80aeb8fd /fs/jffs2/wbuf.c
parent8ca9ed5db3aea8d27989c239e8a2f79b839f1e99 (diff)
[MTD] Introduce writesize
At least two flashes exists that have the concept of a minimum write unit, similar to NAND pages, but no other NAND characteristics. Therefore, rename the minimum write unit to "writesize" for all flashes, including NAND. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
Diffstat (limited to 'fs/jffs2/wbuf.c')
-rw-r--r--fs/jffs2/wbuf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index 62f685faeba8..355226d8ce29 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -1173,7 +1173,7 @@ int jffs2_nand_flash_setup(struct jffs2_sb_info *c)
1173 1173
1174 /* Initialise write buffer */ 1174 /* Initialise write buffer */
1175 init_rwsem(&c->wbuf_sem); 1175 init_rwsem(&c->wbuf_sem);
1176 c->wbuf_pagesize = c->mtd->oobblock; 1176 c->wbuf_pagesize = c->mtd->writesize;
1177 c->wbuf_ofs = 0xFFFFFFFF; 1177 c->wbuf_ofs = 0xFFFFFFFF;
1178 1178
1179 c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL); 1179 c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
@@ -1266,11 +1266,11 @@ void jffs2_nor_ecc_flash_cleanup(struct jffs2_sb_info *c) {
1266 1266
1267int jffs2_nor_wbuf_flash_setup(struct jffs2_sb_info *c) { 1267int jffs2_nor_wbuf_flash_setup(struct jffs2_sb_info *c) {
1268 /* Cleanmarker currently occupies a whole programming region */ 1268 /* Cleanmarker currently occupies a whole programming region */
1269 c->cleanmarker_size = MTD_PROGREGION_SIZE(c->mtd); 1269 c->cleanmarker_size = c->mtd->writesize;
1270 1270
1271 /* Initialize write buffer */ 1271 /* Initialize write buffer */
1272 init_rwsem(&c->wbuf_sem); 1272 init_rwsem(&c->wbuf_sem);
1273 c->wbuf_pagesize = MTD_PROGREGION_SIZE(c->mtd); 1273 c->wbuf_pagesize = c->mtd->writesize;
1274 c->wbuf_ofs = 0xFFFFFFFF; 1274 c->wbuf_ofs = 0xFFFFFFFF;
1275 1275
1276 c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL); 1276 c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL);