mtd: nand: sunxi: disable clks on device removal
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 4 Mar 2016 17:26:40 +0000 (18:26 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 19 Apr 2016 20:05:42 +0000 (22:05 +0200)
mod and ahb clocks are not disabled when the NAND controller device is
removed.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/sunxi_nand.c

index f8b3a7281af0aa8d3ff8ca1d5bea5e3e59ca5037..cad20fb058a1391b1a54d40e2f56ae099c4f262c 100644 (file)
@@ -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;
 }