[MTD] OneNAND: Update copyrights and code cleanup

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Feb 9 09:59:03 EST 2007


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=75384b0d9c04dc2d48f45825f84a982eaf5c2f53
Commit:     75384b0d9c04dc2d48f45825f84a982eaf5c2f53
Parent:     738d61f53781a9b677cb472cbd740aa74e7dcd6d
Author:     Kyungmin Park <kyungmin.park at samsung.com>
AuthorDate: Thu Jan 18 11:10:57 2007 +0900
Committer:  Kyungmin Park <kyungmin.park at samsung.com>
CommitDate: Thu Jan 18 11:10:57 2007 +0900

    [MTD] OneNAND: Update copyrights and code cleanup
    
    Update copyrights and code cleanup
    
    Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
---
 drivers/mtd/onenand/onenand_base.c |   21 +++++++++------------
 include/linux/mtd/onenand.h        |    2 +-
 include/linux/mtd/onenand_regs.h   |    3 ++-
 3 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index d88c7f7..0ade237 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1,7 +1,7 @@
 /*
  *  linux/drivers/mtd/onenand/onenand_base.c
  *
- *  Copyright (C) 2005-2006 Samsung Electronics
+ *  Copyright (C) 2005-2007 Samsung Electronics
  *  Kyungmin Park <kyungmin.park at samsung.com>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -581,8 +581,7 @@ static int onenand_check_bufferram(struct mtd_info *mtd, loff_t addr)
 	int i;
 
 	block = (int) (addr >> this->erase_shift);
-	page = (int) (addr >> this->page_shift);
-	page &= this->page_mask;
+	page = (int) (addr >> this->page_shift) & this->page_mask;
 
 	i = ONENAND_CURRENT_BUFFERRAM(this);
 
@@ -611,8 +610,7 @@ static int onenand_update_bufferram(struct mtd_info *mtd, loff_t addr,
 	int i;
 
 	block = (int) (addr >> this->erase_shift);
-	page = (int) (addr >> this->page_shift);
-	page &= this->page_mask;
+	page = (int) (addr >> this->page_shift) & this->page_mask;
 
 	/* Invalidate BufferRAM */
 	for (i = 0; i < MAX_BUFFERRAM; i++) {
@@ -714,8 +712,6 @@ static int onenand_read(struct mtd_info *mtd, loff_t from, size_t len,
 	/* Grab the lock and see if the device is available */
 	onenand_get_device(mtd, FL_READING);
 
-	/* TODO handling oob */
-
 	stats = mtd->ecc_stats;
 
  	/* Read-while-load method */
@@ -1812,12 +1808,13 @@ static int onenand_lock_user_prot_reg(struct mtd_info *mtd, loff_t from,
 #endif	/* CONFIG_MTD_ONENAND_OTP */
 
 /**
- * onenand_lock_scheme - Check and set OneNAND lock scheme
+ * onenand_check_features - Check and set OneNAND features
  * @param mtd		MTD data structure
  *
- * Check and set OneNAND lock scheme
+ * Check and set OneNAND features
+ * - lock scheme
  */
-static void onenand_lock_scheme(struct mtd_info *mtd)
+static void onenand_check_features(struct mtd_info *mtd)
 {
 	struct onenand_chip *this = mtd->priv;
 	unsigned int density, process;
@@ -1971,8 +1968,8 @@ static int onenand_probe(struct mtd_info *mtd)
 
 	mtd->size = this->chipsize;
 
-	/* Check OneNAND lock scheme */
-	onenand_lock_scheme(mtd);
+	/* Check OneNAND features */
+	onenand_check_features(mtd);
 
 	return 0;
 }
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index a99b294..60b3534 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -1,7 +1,7 @@
 /*
  *  linux/include/linux/mtd/onenand.h
  *
- *  Copyright (C) 2005-2006 Samsung Electronics
+ *  Copyright (C) 2005-2007 Samsung Electronics
  *  Kyungmin Park <kyungmin.park at samsung.com>
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h
index 5b46cb5..af94719 100644
--- a/include/linux/mtd/onenand_regs.h
+++ b/include/linux/mtd/onenand_regs.h
@@ -3,7 +3,8 @@
  *
  *  OneNAND Register header file
  *
- *  Copyright (C) 2005-2006 Samsung Electronics
+ *  Copyright (C) 2005-2007 Samsung Electronics
+ *  Kyungmin Park <kyungmin.park at samsung.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as



More information about the linux-mtd-cvs mailing list