Merge tag 'mvebu-dt-4.8-1' of git://git.infradead.org/linux-mvebu into next/dt
[linux-2.6-block.git] / drivers / mtd / nand / sharpsl.c
index b7d1b55a160b4ebbbbc0fb52d80d8ee99da6612d..064ca1757589ac8d8cba8b536f72ff30632efcfe 100644 (file)
@@ -148,6 +148,7 @@ static int sharpsl_nand_probe(struct platform_device *pdev)
        /* Link the private data with the MTD structure */
        mtd = nand_to_mtd(this);
        mtd->dev.parent = &pdev->dev;
+       mtd_set_ooblayout(mtd, data->ecc_layout);
 
        platform_set_drvdata(pdev, sharpsl);
 
@@ -170,7 +171,6 @@ static int sharpsl_nand_probe(struct platform_device *pdev)
        this->ecc.bytes = 3;
        this->ecc.strength = 1;
        this->badblock_pattern = data->badblock_pattern;
-       this->ecc.layout = data->ecc_layout;
        this->ecc.hwctl = sharpsl_nand_enable_hwecc;
        this->ecc.calculate = sharpsl_nand_calculate_ecc;
        this->ecc.correct = nand_correct_data;