From: Pekon Gupta Date: Tue, 18 Mar 2014 13:26:45 +0000 (+0530) Subject: mtd: nand: omap: ecc.correct: omap_elm_correct_data: cleanup for future enhancements X-Git-Tag: v3.15-rc1~65^2~59 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b08e1f632c79e9e75bf2ae58107df27d0e35b459;p=pandora-kernel.git mtd: nand: omap: ecc.correct: omap_elm_correct_data: cleanup for future enhancements Current omap_elm_correct_data() code is not scalable for future ecc-schemes due to presence of tweaks and hard-coded macros for BCH4_ECC and BCH8_ECC ecc-schemes at multiple places. This patch: - replaces 'ecc_opt' with '(info->nand.ecc.strength == BCH8_MAX_ERROR) used to differentiate between BCH8_HW and BCH4_SW - replaces macros (defining magic number for specific ecc-scheme) with generic variables - removes dependency on macros defined in elm.h (like BCHx_ECC_OOB_BYTES) Tested-by: Stefan Roese Signed-off-by: Pekon Gupta Signed-off-by: Brian Norris --- Reading git-diff-tree failed