Skip to content

Commit

Permalink
nand: mxc_nand: Use clk_prepare_enable/clk_disable_unprepare
Browse files Browse the repository at this point in the history
Prepare the clock before enabling it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Fabio Estevam authored and David Woodhouse committed Jul 6, 2012
1 parent 1696e6b commit 3d05969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/nand/mxc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,15 +784,15 @@ 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;
}

if (!host->clk_act) {
/* Enable the NFC clock */
clk_enable(host->clk);
clk_prepare_enable(host->clk);
host->clk_act = 1;
}

Expand Down

0 comments on commit 3d05969

Please sign in to comment.