mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
mtd: nand: sunxi: use mtd_div_by_ws() helper
Suggested-by: Richard Weinberger <richard@nod.at> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
This commit is contained in:
parent
12197bf21c
commit
46c135c208
@ -624,7 +624,7 @@ static u16 sunxi_nfc_randomizer_step(u16 state, int count)
|
||||
static u16 sunxi_nfc_randomizer_state(struct mtd_info *mtd, int page, bool ecc)
|
||||
{
|
||||
const u16 *seeds = sunxi_nfc_randomizer_page_seeds;
|
||||
int mod = mtd->erasesize / mtd->writesize;
|
||||
int mod = mtd_div_by_ws(mtd->erasesize, mtd);
|
||||
|
||||
if (mod > ARRAY_SIZE(sunxi_nfc_randomizer_page_seeds))
|
||||
mod = ARRAY_SIZE(sunxi_nfc_randomizer_page_seeds);
|
||||
|
Loading…
Reference in New Issue
Block a user