diff options
author | Huang Shijie <b32955@freescale.com> | 2010-12-30 15:29:20 +0800 |
---|---|---|
committer | Huang Shijie <b32955@freescale.com> | 2010-12-30 15:33:06 +0800 |
commit | aae4f4b3958887e0c28652e512968effd4ed1769 (patch) | |
tree | c919e608ac35db710ef75a000ef2aab45be58957 /drivers | |
parent | ee21046f1769163682aaa90cce854a31cae86e70 (diff) |
ENGR00137487 GPMI : remove fake_ecc_layout
We use the ->init_size() to initialize the nand->ecc.layout now.
So the fake_ecc_layout is redundant.
Just remove it.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c index 66bdb47d20d6..cc879a936efd 100644 --- a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c +++ b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c @@ -1907,7 +1907,6 @@ int gpmi_nfc_mil_init(struct gpmi_nfc_data *this) struct mil *mil = &this->mil; struct mtd_info *mtd = &mil->mtd; struct nand_chip *nand = &mil->nand; - static struct nand_ecclayout fake_ecc_layout; int error = 0; /* Initialize MIL data. */ @@ -2015,26 +2014,6 @@ int gpmi_nfc_mil_init(struct gpmi_nfc_data *this) nand->ecc.mode = NAND_ECC_HW; nand->ecc.size = 1; - /* - * Install a "fake" ECC layout. - * - * We'll be calling nand_scan() to do the final MTD setup. If we haven't - * already chosen an ECC layout, then nand_scan() will choose one based - * on the part geometry it discovers. Unfortunately, it doesn't make - * good choices. It would be best if we could install the correct ECC - * layout now, before we call nand_scan(). We can't do that because we - * don't know the medium geometry yet. Here, we install a "fake" ECC - * layout just to stop nand_scan() from trying to pick one for itself. - * Later, when we know the medium geometry, we'll install the correct - * one. - * - * Of course, this tactic depends critically on the MTD code not doing - * an I/O operation that depends on the ECC layout being sensible. This - * is in fact the case. - */ - memset(&fake_ecc_layout, 0, sizeof(fake_ecc_layout)); - nand->ecc.layout = &fake_ecc_layout; - /* Allocate a command buffer. */ mil->cmd_virt = dma_alloc_coherent(dev, |