mtd: nand: gpmi: Kill gpmi_nand_exit()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Jul 13 10:59:14 PDT 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=ebb528d97830731b5fce27a72191e4fb94a4e66d
Commit:     ebb528d97830731b5fce27a72191e4fb94a4e66d
Parent:     4d02423e9afe6c46142ce98bbcaf5167316dbfbf
Author:     Boris Brezillon <boris.brezillon at free-electrons.com>
AuthorDate: Mon Apr 10 10:35:18 2017 +0200
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Thu Jun 1 10:09:27 2017 +0200

    mtd: nand: gpmi: Kill gpmi_nand_exit()
    
    The only user of gpmi_nand_exit() is gpmi_nand_remove(). Move its content
    to the caller.
    
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
    Reviewed-by: Marek Vasut <marek.vasut at gmail.com>
    Acked-by: Han Xu <han.xu at nxp.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index f7ac81e..50f8d4a 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -1936,12 +1936,6 @@ static int gpmi_set_geometry(struct gpmi_nand_data *this)
 	return gpmi_alloc_dma_buffer(this);
 }
 
-static void gpmi_nand_exit(struct gpmi_nand_data *this)
-{
-	nand_release(nand_to_mtd(&this->nand));
-	gpmi_free_dma_buffer(this);
-}
-
 static int gpmi_init_last(struct gpmi_nand_data *this)
 {
 	struct nand_chip *chip = &this->nand;
@@ -2141,7 +2135,8 @@ static int gpmi_nand_remove(struct platform_device *pdev)
 {
 	struct gpmi_nand_data *this = platform_get_drvdata(pdev);
 
-	gpmi_nand_exit(this);
+	nand_release(nand_to_mtd(&this->nand));
+	gpmi_free_dma_buffer(this);
 	release_resources(this);
 	return 0;
 }



More information about the linux-mtd-cvs mailing list