summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2020-05-19 16:00:35 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-05-31 11:53:40 +0300
commit9630a055256de420d528ecde9f35902a9dcd8750 (patch)
treef760c21b20eea43a54d8882ca47ab5254174530b /Documentation
parent5724fa7f2e25a0f355063ba9271529fa00c32206 (diff)
downloadlinux-9630a055256de420d528ecde9f35902a9dcd8750.tar.xz
mtd: rawnand: Stop using nand_release()
This helper is not very useful and very often people get confused: they use nand_release() instead of nand_cleanup(). Now that all drivers have been converted to do not use nand_release() anymore, let's remove this helper. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/linux-mtd/20200519130035.1883-63-miquel.raynal@bootlin.com
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/driver-api/mtdnand.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/driver-api/mtdnand.rst b/Documentation/driver-api/mtdnand.rst
index 55447659b81f..0bf8d6ec3f54 100644
--- a/Documentation/driver-api/mtdnand.rst
+++ b/Documentation/driver-api/mtdnand.rst
@@ -276,8 +276,10 @@ unregisters the partitions in the MTD layer.
#ifdef MODULE
static void __exit board_cleanup (void)
{
- /* Release resources, unregister device */
- nand_release (mtd_to_nand(board_mtd));
+ /* Unregister device */
+ WARN_ON(mtd_device_unregister(board_mtd));
+ /* Release resources */
+ nand_cleanup(mtd_to_nand(board_mtd));
/* unmap physical address */
iounmap(baseaddr);