nand: mxc_nand: Use clk_prepare_enable/clk_disable_unprepare

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Jul 6 13:59:04 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=3d059693f6e0489066a98f455601137fa003df77
Commit:     3d059693f6e0489066a98f455601137fa003df77
Parent:     1696e6bc2ae83734e64e206ac99766ea19e9a14e
Author:     Fabio Estevam <fabio.estevam at freescale.com>
AuthorDate: Fri May 25 20:14:50 2012 -0300
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Jul 6 18:17:05 2012 +0100

    nand: mxc_nand: Use clk_prepare_enable/clk_disable_unprepare
    
    Prepare the clock before enabling it.
    
    Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/mxc_nand.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 6acc790..fc3b38c 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -784,7 +784,7 @@ static void mxc_nand_select_chip_v2(struct mtd_info *mtd, int chip)
 	if (chip == -1) {
 		/* Disable the NFC clock */
 		if (host->clk_act) {
-			clk_disable(host->clk);
+			clk_disable_unprepare(host->clk);
 			host->clk_act = 0;
 		}
 		return;
@@ -792,7 +792,7 @@ static void mxc_nand_select_chip_v2(struct mtd_info *mtd, int chip)
 
 	if (!host->clk_act) {
 		/* Enable the NFC clock */
-		clk_enable(host->clk);
+		clk_prepare_enable(host->clk);
 		host->clk_act = 1;
 	}
 



More information about the linux-mtd-cvs mailing list