summaryrefslogtreecommitdiff
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2018-11-13 09:31:46 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-11-13 09:31:46 +0100
commit9e3e4d8a093b81a6e5bf453b073a0a531411ab6e (patch)
tree4f4b54f5192dabddeb2864035115336f5cdade51 /include/linux/mtd
parent647ad49ca672b80a3fbf8396bd453ef68ba4916c (diff)
parentccda4af0f4b92f7b4c308d3acc262f4a7e3affad (diff)
Merge tag 'v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into nand/next
Linux 4.20-rc2
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/nand.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index abe975c87b90..7f53ece2c039 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;
}
/**
@@ -569,7 +568,7 @@ static inline void nanddev_pos_next_eraseblock(struct nand_device *nand,
}
/**
- * nanddev_pos_next_eraseblock() - Move a position to the next page
+ * nanddev_pos_next_page() - Move a position to the next page
* @nand: NAND device
* @pos: the position to update
*