mtd: add init_size hook for NAND driver
authorHuang Shijie <shijie8@gmail.com>
Mon, 27 Sep 2010 02:43:53 +0000 (10:43 +0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 24 Oct 2010 23:49:57 +0000 (00:49 +0100)
commit12a40a57f762f569f58a393437d8c13864db390a
tree2ab939b100ff7604422e31719fc1621e7b2f7ee3
parent088bd455c954c0c42edde9d4463e44be10101aac
mtd: add init_size hook for NAND driver

Not all the NAND devices have all the information in additional
id bytes.

So add a hook in the nand_chip{} is a good method to calculate the
right value of oobsize, erasesize and so on.

Without the hook,you will get the wrong value, and you have to hack
in the ->scan_bbt() to change the wrong value which make the code
mess.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/nand_base.c
include/linux/mtd/nand.h