mtd: make pagetest work
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 27 Nov 2009 14:58:08 +0000 (16:58 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 30 Nov 2009 10:02:41 +0000 (10:02 +0000)
The mtd_pagetest test did not initialize the pgsize variable, which
basically means it did not work. This problem was reported by
Török Edwin <edwintorok@gmail.com>

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/tests/mtd_pagetest.c

index 103cac480feec2fbf622db0d4d65694cc611547a..ce17cbe918c5a1e4fe411a51eb7d92eafa22308e 100644 (file)
@@ -523,6 +523,7 @@ static int __init mtd_pagetest_init(void)
        do_div(tmp, mtd->erasesize);
        ebcnt = tmp;
        pgcnt = mtd->erasesize / mtd->writesize;
+       pgsize = mtd->writesize;
 
        printk(PRINT_PREF "MTD device size %llu, eraseblock size %u, "
               "page size %u, count of eraseblocks %u, pages per "