diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-01-11 19:53:16 +0300 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-02-25 14:28:35 +0300 |
commit | 9c14b153e6af1301f022d34f1f63888f333e3ef5 (patch) | |
tree | 7d8dbc3330feffc2ac285dc6636862577055c411 /drivers/mtd/nand/mxc_nand.c | |
parent | b840bc11b5062803c204d8a9625a1a1c5812d6d6 (diff) | |
download | linux-9c14b153e6af1301f022d34f1f63888f333e3ef5.tar.xz |
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>
Diffstat (limited to 'drivers/mtd/nand/mxc_nand.c')
-rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 10 |
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) DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n"); ret = mtd->suspend(mtd); - /* Disable the NFC clock */ - clk_disable(host->clk); + + /* + * nand_suspend locks the device for exclusive access, so + * the clock must already be off. + */ + BUG_ON(!ret && host->clk_act); return ret; } @@ -903,8 +907,6 @@ static int mxcnd_resume(struct platform_device *pdev) DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n"); - /* Enable the NFC clock */ - clk_enable(host->clk); mtd->resume(mtd); return ret; |