History

mtd: nand: Add a helper to retrieve the number of pages per target

Will be used by the raw NAND framework.

Boris Brezillon committed 8 years ago

Commit 46b01d71 parent 7c4ecca1 file · +14 −0Browse files

Unified · Split

include/linux/mtd/nand.h+14−0
@@ -271,6 +271,20 @@ nanddev_pages_per_eraseblock(const struct nand_device *nand) · 270 unmodified lines
271 return nand->memorg.pages_per_eraseblock;271 return nand->memorg.pages_per_eraseblock;
272}272}
273 273
274/**
275 * nanddev_pages_per_target() - Get the number of pages per target
276 * @nand: NAND device
277 *
278 * Return: the number of pages per target.
279 */
280static inline unsigned int
281nanddev_pages_per_target(const struct nand_device *nand)
282{
283 return nand->memorg.pages_per_eraseblock *
284 nand->memorg.eraseblocks_per_lun *
285 nand->memorg.luns_per_target;
286}
287
274/**288/**
275 * nanddev_per_page_oobsize() - Get NAND erase block size289 * nanddev_per_page_oobsize() - Get NAND erase block size
276 * @nand: NAND device290 * @nand: NAND device

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t