mtd: sm_ftl: remove CONFIG_SM_FTL_MUSEUM and make it always on

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Mar 26 11:59:02 EDT 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=01de69c2b0e471844193532a85c173f51d9ea6b2
Commit:     01de69c2b0e471844193532a85c173f51d9ea6b2
Parent:     e5f710cfc6947e64672b7205f7992515868c7782
Author:     Maxim Levitsky <maximlevitsky at gmail.com>
AuthorDate: Fri Mar 19 14:05:51 2010 +0200
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Mar 26 15:28:59 2010 +0000

    mtd: sm_ftl: remove CONFIG_SM_FTL_MUSEUM and make it always on
    
    The sole purpose of this setting was to avoid a dependency on MTD_NAND.
    Now that we can depend on MTD_NAND_ECC without pulling in all the rest
    of the NAND code, we might as well do so unconditionally.
    
    Signed-off-by: Maxim Levitsky <maximlevitsky at gmail.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/Kconfig  |    9 ---------
 drivers/mtd/sm_ftl.c |    8 +-------
 2 files changed, 1 insertions(+), 16 deletions(-)

diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index e652080..f8210bf 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -317,15 +317,6 @@ config SM_FTL
 	  eat your card, so please don't use it together with valuable data.
 	  Use readonly driver (CONFIG_SSFDC) instead.
 
-config SM_FTL_MUSEUM
-	boolean "Additional Support for 1MiB and 2MiB SmartMedia cards"
-	depends on SM_FTL
-	select MTD_NAND_ECC_SMC
-	help
-	  Very old SmartMedia cards need ECC to be calculated in the FTL.
-	  Such cards are very rare, thus enabling this option is mostly useless.
-	  Also this support is completely UNTESTED.
-
 config MTD_OOPS
 	tristate "Log panic/oops to an MTD buffer"
 	depends on MTD
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index 2e7307d..a9b4e34 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -15,12 +15,10 @@
 #include <linux/freezer.h>
 #include <linux/sysfs.h>
 #include <linux/bitops.h>
+#include <linux/mtd/nand_ecc.h>
 #include "nand/sm_common.h"
 #include "sm_ftl.h"
 
-#ifdef CONFIG_SM_FTL_MUSEUM
-#include <linux/mtd/nand_ecc.h>
-#endif
 
 
 struct workqueue_struct *cache_flush_workqueue;
@@ -206,7 +204,6 @@ static void sm_break_offset(struct sm_ftl *ftl, loff_t offset,
 
 static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob)
 {
-#ifdef CONFIG_SM_FTL_MUSEUM
 	uint8_t ecc[3];
 
 	__nand_calculate_ecc(buffer, SM_SMALL_PAGE, ecc);
@@ -218,7 +215,6 @@ static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob)
 	__nand_calculate_ecc(buffer, SM_SMALL_PAGE, ecc);
 	if (__nand_correct_data(buffer, ecc, oob->ecc2, SM_SMALL_PAGE) < 0)
 		return -EIO;
-#endif
 	return 0;
 }
 
@@ -382,7 +378,6 @@ restart:
 			oob.data_status = 0;
 		}
 
-#ifdef CONFIG_SM_FTL_MUSEUM
 		if (ftl->smallpagenand) {
 			__nand_calculate_ecc(buf + boffset,
 						SM_SMALL_PAGE, oob.ecc1);
@@ -390,7 +385,6 @@ restart:
 			__nand_calculate_ecc(buf + boffset + SM_SMALL_PAGE,
 						SM_SMALL_PAGE, oob.ecc2);
 		}
-#endif
 		if (!sm_write_sector(ftl, zone, block, boffset,
 							buf + boffset, &oob))
 			continue;



More information about the linux-mtd-cvs mailing list