aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-01-11 11:53:16 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-02-25 06:28:35 -0500
commit9c14b153e6af1301f022d34f1f63888f333e3ef5 (patch)
tree7d8dbc3330feffc2ac285dc6636862577055c411
parentb840bc11b5062803c204d8a9625a1a1c5812d6d6 (diff)
mtd: mxc-nand: don't disable clock in mxcnd-suspend
The clock must already be off after mtd->suspend. Disabling it again results in an negative overflow of the clock usage count. This didn't hurt as mxcnd_resume undid it after wake up. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/nand/mxc_nand.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 84f363571c24..970ce6bd06a8 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -888,8 +888,12 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
888 DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n"); 888 DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
889 889
890 ret = mtd->suspend(mtd); 890 ret = mtd->suspend(mtd);
891 /* Disable the NFC clock */ 891
892 clk_disable(host->clk); 892 /*
893 * nand_suspend locks the device for exclusive access, so
894 * the clock must already be off.
895 */
896 BUG_ON(!ret && host->clk_act);
893 897
894 return ret; 898 return ret;
895} 899}
@@ -903,8 +907,6 @@ static int mxcnd_resume(struct platform_device *pdev)
903 907
904 DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n"); 908 DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
905 909
906 /* Enable the NFC clock */
907 clk_enable(host->clk);
908 mtd->resume(mtd); 910 mtd->resume(mtd);
909 911
910 return ret; 912 return ret;