mtd: nand: sunxi: disable clks on device removal

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon May 23 21:59:10 PDT 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=dd26a4584c37687b8bbe89233bcc23279ca361b1
Commit:     dd26a4584c37687b8bbe89233bcc23279ca361b1
Parent:     68ffbf7f9fb11323238cb31c956b4f381e6b05cc
Author:     Boris Brezillon <boris.brezillon at free-electrons.com>
AuthorDate: Fri Mar 4 18:26:40 2016 +0100
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Tue Apr 19 22:05:42 2016 +0200

    mtd: nand: sunxi: disable clks on device removal
    
    mod and ahb clocks are not disabled when the NAND controller device is
    removed.
    
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
 drivers/mtd/nand/sunxi_nand.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index f8b3a72..cad20fb 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -1845,6 +1845,8 @@ static int sunxi_nfc_remove(struct platform_device *pdev)
 	struct sunxi_nfc *nfc = platform_get_drvdata(pdev);
 
 	sunxi_nand_chips_cleanup(nfc);
+	clk_disable_unprepare(nfc->mod_clk);
+	clk_disable_unprepare(nfc->ahb_clk);
 
 	return 0;
 }



More information about the linux-mtd-cvs mailing list