aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c')
-rw-r--r--target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c b/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
index 22e2660b38..e42631525c 100644
--- a/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
+++ b/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c
@@ -188,13 +188,8 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
if (mtd->writesize == 512)
mtd_set_ooblayout(mtd, &rb4xx_nand_ecclayout_ops);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0)
nand->chip.ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT;
nand->chip.ecc.algo = NAND_ECC_ALGO_HAMMING;
-#else
- nand->chip.ecc.mode = NAND_ECC_SOFT;
- nand->chip.ecc.algo = NAND_ECC_HAMMING;
-#endif
nand->chip.options = NAND_NO_SUBPAGE_WRITE;
nand->chip.priv = nand;
@@ -211,12 +206,8 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
ret = mtd_device_register(mtd, NULL, 0);
if (ret) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)
mtd_device_unregister(nand_to_mtd(&nand->chip));
nand_cleanup(&nand->chip);
-#else
- nand_release(&nand->chip);
-#endif
return ret;
}
@@ -227,12 +218,8 @@ static int rb4xx_nand_remove(struct platform_device *pdev)
{
struct rb4xx_nand *nand = platform_get_drvdata(pdev);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)
- mtd_device_unregister(nand_to_mtd(&nand->chip));
- nand_cleanup(&nand->chip);
-#else
- nand_release(&nand->chip);
-#endif
+ mtd_device_unregister(nand_to_mtd(&nand->chip));
+ nand_cleanup(&nand->chip);
return 0;
}