mtd: nand: simplify nand_bch_init() usage
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Mon, 7 Mar 2016 09:46:54 +0000 (10:46 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 8 Mar 2016 00:23:09 +0000 (16:23 -0800)
commita8c65d504e0b2256f7672506ae6ea68d88ef020a
treefb123fc52e4b2d09a3f7f77680276d828696abc2
parentf2de0fa64306651bc5aa04f6bb56c057658486d5
mtd: nand: simplify nand_bch_init() usage

nand_bch_init() requires several arguments which could directly be deduced
from the mtd device. Get rid of those useless parameters.

nand_bch_init() is also requiring the caller to provide a proper eccbytes
value, while this value could be deduced from the ecc.size and
ecc.strength value. Fallback to eccbytes calculation when it is set to 0.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bch.c
drivers/mtd/nand/omap2.c
include/linux/mtd/nand_bch.h