Skip to content

Commit

Permalink
mtd mxc_nand: prepare/unprepare clock
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Sascha Hauer committed Apr 25, 2012
1 parent 3a9465f commit 97c3213
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/mtd/nand/mxc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,15 +690,15 @@ static void mxc_nand_select_chip(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 Expand Up @@ -1078,7 +1078,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
goto eclk;
}

clk_enable(host->clk);
clk_prepare_enable(host->clk);
host->clk_act = 1;

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down

0 comments on commit 97c3213

Please sign in to comment.