[PATCH 09/15] nand: mxc_nand: Use clk_prepare_enable/clk_disable_unprepare

Fabio Estevam festevam at gmail.com
Fri May 25 19:14:50 EDT 2012


From: Fabio Estevam <fabio.estevam at freescale.com>

Prepare the clock before enabling it.

Cc: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Cc: <linux-mtd at lists.infradead.org>
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.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 fd14966..d6efa17 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -764,7 +764,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;
@@ -772,7 +772,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;
 	}
 
-- 
1.7.1




More information about the linux-mtd mailing list