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>
This commit is contained in:
Родитель
861fae1818
Коммит
cda320915d
|
@ -737,8 +737,7 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf,
|
|||
/* Calc length */
|
||||
len = (size_t) (numblocks >> sft);
|
||||
/* Make it page aligned ! */
|
||||
len = (len + (mtd->writesize - 1)) &
|
||||
~(mtd->writesize - 1);
|
||||
len = ALIGN(len, mtd->writesize);
|
||||
/* Preset the buffer with 0xff */
|
||||
memset(buf, 0xff, len +
|
||||
(len >> this->page_shift)* mtd->oobsize);
|
||||
|
|
Загрузка…
Ссылка в новой задаче