diff options
author | Richard Weinberger <richard@nod.at> | 2016-09-21 12:44:41 +0300 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-09-23 10:35:16 +0300 |
commit | d44154f969a44269a9288c274c1c2fd9e85df8a5 (patch) | |
tree | e7988379fcd6d1a917db7139f11f4bac95fc46f9 /include/linux/mtd | |
parent | a9843193ce00b7f83432abe0815d03ffbeaf6ecf (diff) | |
download | linux-d44154f969a44269a9288c274c1c2fd9e85df8a5.tar.xz |
mtd: nand: Provide nand_cleanup() function to free NAND related resources
Provide a nand_cleanup() function to free all nand related resources
without unregistering the mtd device.
This should allow drivers to call mtd_device_unregister() and handle
its return value and still being able to cleanup all nand related
resources.
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Daniel Walter <dwalter@sigma-star.at>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/nand.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 331caf987b16..c5d3d5024fc8 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -38,7 +38,7 @@ int nand_scan_ident(struct mtd_info *mtd, int max_chips, struct nand_flash_dev *table); int nand_scan_tail(struct mtd_info *mtd); -/* Free resources held by the NAND device */ +/* Unregister the MTD device and free resources held by the NAND device */ void nand_release(struct mtd_info *mtd); /* Internal helper for board drivers which need to override command function */ @@ -1186,4 +1186,7 @@ int nand_read_oob_syndrome(struct mtd_info *mtd, struct nand_chip *chip, /* Reset and initialize a NAND device */ int nand_reset(struct nand_chip *chip); +/* Free resources held by the NAND device */ +void nand_cleanup(struct nand_chip *chip); + #endif /* __LINUX_MTD_NAND_H */ |