diff options
author | Brian Norris <computersforpeace@gmail.com> | 2016-01-23 03:57:13 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2016-01-23 21:51:43 +0100 |
commit | 46c135c208a3a80bd7f12dee0032bbc6d507a0d9 (patch) | |
tree | cf5f9e62e497e4860fc169652657f68e2644cc1a /drivers/mtd/nand/sunxi_nand.c | |
parent | mtd: atmel_nand: Do not warn on bitflips (diff) | |
download | linux-46c135c208a3a80bd7f12dee0032bbc6d507a0d9.tar.xz linux-46c135c208a3a80bd7f12dee0032bbc6d507a0d9.zip |
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/mtd/nand/sunxi_nand.c')
-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); |