mtd: nand: s3c2410: kill the ->ecc_layout field

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Mar 24 11:59:03 PDT 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=f88f44cbf10cf5bd42d6e46ea6625d9bfa5f155d
Commit:     f88f44cbf10cf5bd42d6e46ea6625d9bfa5f155d
Parent:     2c9e57799f1b7ef35a9e7f774edac6b3feac6399
Author:     Boris BREZILLON <boris.brezillon at free-electrons.com>
AuthorDate: Mon Dec 7 23:25:59 2015 +0100
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Jan 26 10:27:35 2016 -0800

    mtd: nand: s3c2410: kill the ->ecc_layout field
    
    The s3c2410 is allowing board data to overload the default ECC layout
    defined inside the driver, but this feature is not used by board
    specific definitions.
    Kill this field so that we can easily move to a model where ecclayout
    are dynamically allocated by the NAND controller driver.
    
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
    Acked-by: Krzysztof Kozlowski <k.kozlowski at samsung.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 arch/arm/plat-samsung/devs.c                   | 9 ---------
 drivers/mtd/nand/s3c2410.c                     | 3 ---
 include/linux/platform_data/mtd-nand-s3c2410.h | 1 -
 3 files changed, 13 deletions(-)

diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index b53d4ff..84baa16 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -727,15 +727,6 @@ static int __init s3c_nand_copy_set(struct s3c2410_nand_set *set)
 			return -ENOMEM;
 	}
 
-	if (set->ecc_layout) {
-		ptr = kmemdup(set->ecc_layout,
-			      sizeof(struct nand_ecclayout), GFP_KERNEL);
-		set->ecc_layout = ptr;
-
-		if (!ptr)
-			return -ENOMEM;
-	}
-
 	return 0;
 }
 
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 01ac74f..9c9397b 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -861,9 +861,6 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
 	chip->ecc.mode	    = NAND_ECC_SOFT;
 #endif
 
-	if (set->ecc_layout != NULL)
-		chip->ecc.layout = set->ecc_layout;
-
 	if (set->disable_ecc)
 		chip->ecc.mode	= NAND_ECC_NONE;
 
diff --git a/include/linux/platform_data/mtd-nand-s3c2410.h b/include/linux/platform_data/mtd-nand-s3c2410.h
index 36bb921..c55e42e 100644
--- a/include/linux/platform_data/mtd-nand-s3c2410.h
+++ b/include/linux/platform_data/mtd-nand-s3c2410.h
@@ -40,7 +40,6 @@ struct s3c2410_nand_set {
 	char			*name;
 	int			*nr_map;
 	struct mtd_partition	*partitions;
-	struct nand_ecclayout	*ecc_layout;
 };
 
 struct s3c2410_platform_nand {



More information about the linux-mtd-cvs mailing list