diff options
author | Brian Norris <computersforpeace@gmail.com> | 2016-01-22 18:57:13 -0800 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2016-01-23 12:51:43 -0800 |
commit | 46c135c208a3a80bd7f12dee0032bbc6d507a0d9 (patch) | |
tree | cf5f9e62e497e4860fc169652657f68e2644cc1a /drivers | |
parent | 12197bf21c26e23053fa6223f3a731a965542986 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/sunxi_nand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c index 5f700719d5c2..b5ea6b312df0 100644 --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c @@ -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); |