Skip to content
Commit aeb93af9 authored by Boris Brezillon's avatar Boris Brezillon
Browse files

mtd: nand: Only allocate ecc->{calc, code}_buf when actually needed



The only users of the ecc->{calc,code}_buf buffers are NAND controller
drivers implementing ecc->calculate() and/or ecc->correct(). Since the
->oobsize can be non-negligle, especially on modern NAND devices, we'd
better allocate it only when it is actually required.

Make ecc->{calc,code}_buf allocation dependent on the presence of
ecc->calculate() or ecc->correct().

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 8c677541
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment