diff options
author | Richard Weinberger <richard@nod.at> | 2016-09-21 11:44:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-14 09:46:22 +0200 |
commit | 9b9dcd96e5b43905ece89d72883a08c42886ebf9 (patch) | |
tree | 1c0e59857dad9da7d9e86665febe10b90198fb7f /include | |
parent | 557d674f48c7419332b55cc0dc9467f72f16b1df (diff) |
mtd: nand: Provide nand_cleanup() function to free NAND related resources
[ Upstream commit d44154f969a44269a9288c274c1c2fd9e85df8a5 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/nand.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 93fc37200793..1a066faf7b80 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -38,7 +38,7 @@ extern int nand_scan_ident(struct mtd_info *mtd, int max_chips, struct nand_flash_dev *table); extern 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 */ extern void nand_release(struct mtd_info *mtd); /* Internal helper for board drivers which need to override command function */ @@ -1029,4 +1029,8 @@ int nand_check_erased_ecc_chunk(void *data, int datalen, void *ecc, int ecclen, void *extraoob, int extraooblen, int threshold); + +/* Free resources held by the NAND device */ +void nand_cleanup(struct nand_chip *chip); + #endif /* __LINUX_MTD_NAND_H */ |