mtd: mxc_nand: add missing clk_disable_unprepare() in mxcnd_remove()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 17 Dec 2013 03:35:35 +0000 (11:35 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 3 Jan 2014 19:22:24 +0000 (11:22 -0800)
clock source is prepared and enabled by clk_prepare_enable() in
mxcnd_probe() function, but no disable/unprepare in mxcnd_remove().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/mxc_nand.c

index 7a4e032..567a5e5 100644 (file)
@@ -1577,6 +1577,8 @@ static int mxcnd_remove(struct platform_device *pdev)
        struct mxc_nand_host *host = platform_get_drvdata(pdev);
 
        nand_release(&host->mtd);
+       if (host->clk_act)
+               clk_disable_unprepare(host->clk);
 
        return 0;
 }