mtd: nand: gpmi: Kill gpmi_nand_exit()
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 10 Apr 2017 08:35:18 +0000 (10:35 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 1 Jun 2017 08:09:27 +0000 (10:09 +0200)
The only user of gpmi_nand_exit() is gpmi_nand_remove(). Move its content
to the caller.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Han Xu <han.xu@nxp.com>
drivers/mtd/nand/gpmi-nand/gpmi-nand.c

index f7ac81e44ce710d806f803a1fee9bca142094c9e..50f8d4a1b9832326070045d0c294d22393001fbd 100644 (file)
@@ -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;
 }