aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2010-09-29 13:43:50 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-10-24 19:52:50 -0400
commitcda320915db00a07e5c4cdfc79806c3b80c0c7f2 (patch)
tree0889d861e184d824e81529f9ace74540b8f16418 /drivers
parent861fae1818db2ef09e6f3a836816fb1c2c402666 (diff)
mtd: nand: use ALIGN where possible
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/nand_bbt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 5fedf4a74f16..a2a4e179a355 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -737,8 +737,7 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf,
737 /* Calc length */ 737 /* Calc length */
738 len = (size_t) (numblocks >> sft); 738 len = (size_t) (numblocks >> sft);
739 /* Make it page aligned ! */ 739 /* Make it page aligned ! */
740 len = (len + (mtd->writesize - 1)) & 740 len = ALIGN(len, mtd->writesize);
741 ~(mtd->writesize - 1);
742 /* Preset the buffer with 0xff */ 741 /* Preset the buffer with 0xff */
743 memset(buf, 0xff, len + 742 memset(buf, 0xff, len +
744 (len >> this->page_shift)* mtd->oobsize); 743 (len >> this->page_shift)* mtd->oobsize);