mtd: nand: denali: Avoid using ecc->code_buf as a temporary buffer
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 5 Dec 2017 11:09:28 +0000 (12:09 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 14 Dec 2017 12:34:22 +0000 (13:34 +0100)
commit8c677541bb24871ce44b5a1e327a3e7f5792eae4
tree19a4df260d55971146f321acc76a83432ba0f6fe
parent98dea8d71931460c189e5001b0faf2180a42db42
mtd: nand: denali: Avoid using ecc->code_buf as a temporary buffer

ECC bytes are contiguous in the ->oob_poi buffer, which means we don't
have to copy them into ->code_buf (here used as a temporary buffer)
before passing them to the nand_check_erased_ecc_chunk() function.

This change will allow us to allocate ecc->{code,calc}_buf only when
ecc->calculate() or ecc->correct() is specified.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
drivers/mtd/nand/denali.c