From b08e1f632c79e9e75bf2ae58107df27d0e35b459 Mon Sep 17 00:00:00 2001 From: Pekon Gupta Date: Tue, 18 Mar 2014 18:56:45 +0530 Subject: [PATCH] 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-format-patch failed