mtd: add MTD_MLCNANDFLASH case for mtd_type_show()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Nov 13 13:59:03 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=f48372465ffdff62a6d75a6f34bc850855fb6470
Commit:     f48372465ffdff62a6d75a6f34bc850855fb6470
Parent:     4f8a3ba700b882f61d4cea2d68a8f83fa93c6dfd
Author:     Huang Shijie <b32955 at freescale.com>
AuthorDate: Wed Sep 25 14:58:19 2013 +0800
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Sun Oct 27 16:27:06 2013 -0700

    mtd: add MTD_MLCNANDFLASH case for mtd_type_show()
    
    The current mtd_type_show() misses the MTD_MLCNANDFLASH case.
    This patch adds the case for it, and also updates the ABI.
    
    Signed-off-by: Huang Shijie <b32955 at freescale.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 Documentation/ABI/testing/sysfs-class-mtd | 2 +-
 drivers/mtd/mtdcore.c                     | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/ABI/testing/sysfs-class-mtd b/Documentation/ABI/testing/sysfs-class-mtd
index bfd119a..1399bb2 100644
--- a/Documentation/ABI/testing/sysfs-class-mtd
+++ b/Documentation/ABI/testing/sysfs-class-mtd
@@ -104,7 +104,7 @@ Description:
 		One of the following ASCII strings, representing the device
 		type:
 
-		absent, ram, rom, nor, nand, dataflash, ubi, unknown
+		absent, ram, rom, nor, nand, mlc-nand, dataflash, ubi, unknown
 
 What:		/sys/class/mtd/mtdX/writesize
 Date:		April 2009
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 5e14d54..92311a5 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -157,6 +157,9 @@ static ssize_t mtd_type_show(struct device *dev,
 	case MTD_UBIVOLUME:
 		type = "ubi";
 		break;
+	case MTD_MLCNANDFLASH:
+		type = "mlc-nand";
+		break;
 	default:
 		type = "unknown";
 	}



More information about the linux-mtd-cvs mailing list