mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Acked-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
This commit is contained in:
parent
4209628843
commit
11041ae65a
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue