mtd: use MTD_OPS_PLACE_OOB macro consistently

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Jul 16 16:59:02 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=11041ae65abfeaea959060ad17d167732f604ecf
Commit:     11041ae65abfeaea959060ad17d167732f604ecf
Parent:     420962884379bd434a7f643d0936281b2ab4b30c
Author:     Huang Shijie <b32955 at freescale.com>
AuthorDate: Tue Jul 3 16:44:14 2012 +0800
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Jul 16 21:43:17 2012 +0100

    mtd: use MTD_OPS_PLACE_OOB macro consistently
    
    Use the MTD_OPS_PLACE_OOB to replace the hard code "0".
    Make the code more readable.
    
    Signed-off-by: Huang Shijie <b32955 at freescale.com>
    Acked-by: Brian Norris <computersforpeace at gmail.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/nand_base.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 98ba46e..ead301a 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1625,7 +1625,7 @@ static int nand_read(struct mtd_info *mtd, loff_t from, size_t len,
 	ops.len = len;
 	ops.datbuf = buf;
 	ops.oobbuf = NULL;
-	ops.mode = 0;
+	ops.mode = MTD_OPS_PLACE_OOB;
 	ret = nand_do_read_ops(mtd, from, &ops);
 	*retlen = ops.retlen;
 	nand_release_device(mtd);
@@ -2331,7 +2331,7 @@ static int panic_nand_write(struct mtd_info *mtd, loff_t to, size_t len,
 	ops.len = len;
 	ops.datbuf = (uint8_t *)buf;
 	ops.oobbuf = NULL;
-	ops.mode = 0;
+	ops.mode = MTD_OPS_PLACE_OOB;
 
 	ret = nand_do_write_ops(mtd, to, &ops);
 
@@ -2360,7 +2360,7 @@ static int nand_write(struct mtd_info *mtd, loff_t to, size_t len,
 	ops.len = len;
 	ops.datbuf = (uint8_t *)buf;
 	ops.oobbuf = NULL;
-	ops.mode = 0;
+	ops.mode = MTD_OPS_PLACE_OOB;
 	ret = nand_do_write_ops(mtd, to, &ops);
 	*retlen = ops.retlen;
 	nand_release_device(mtd);



More information about the linux-mtd-cvs mailing list