summaryrefslogtreecommitdiff
path: root/include/linux/mtd/nand.h
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2018-11-27 08:23:56 +0300
committerJoel Stanley <joel@jms.id.au>2018-11-27 08:24:09 +0300
commitd608acfd4ac3fe17f3081bee8fcd4dcd896c2ffa (patch)
treeade4450a72a2e358a1d2e5cde321de0097fb291c /include/linux/mtd/nand.h
parent62ccc3924eff37012bd0c227d8b7dc71188fc358 (diff)
parenta9da8725b7a744be3ff0ff44cab2547e4d1e6675 (diff)
downloadlinux-dev-4.18.tar.xz
Merge tag 'v4.18.20' into dev-4.18dev-4.18
This is the 4.18.20 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'include/linux/mtd/nand.h')
-rw-r--r--include/linux/mtd/nand.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index abe975c87b90..78b86dea2f29 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -324,9 +324,8 @@ static inline unsigned int nanddev_ntargets(const struct nand_device *nand)
*/
static inline unsigned int nanddev_neraseblocks(const struct nand_device *nand)
{
- return (u64)nand->memorg.luns_per_target *
- nand->memorg.eraseblocks_per_lun *
- nand->memorg.pages_per_eraseblock;
+ return nand->memorg.ntargets * nand->memorg.luns_per_target *
+ nand->memorg.eraseblocks_per_lun;
}
/**