mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mtd: nand: sharpsl: switch to mtd_ooblayout_ops
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <[email protected]>
This commit is contained in:
parent
7cf9c19a83
commit
e5b2d30e42
3 changed files with 47 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue