From c26c102417a20476f4b09ba1ca872bf553959ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 11 Jan 2010 17:53:16 +0100 Subject: [PATCH] --- yaml --- r: 195858 b: refs/heads/master c: 9c14b153e6af1301f022d34f1f63888f333e3ef5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/mtd/nand/mxc_nand.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 207c3a475992..5bad9c22c89d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b840bc11b5062803c204d8a9625a1a1c5812d6d6 +refs/heads/master: 9c14b153e6af1301f022d34f1f63888f333e3ef5 diff --git a/trunk/drivers/mtd/nand/mxc_nand.c b/trunk/drivers/mtd/nand/mxc_nand.c index 84f363571c24..970ce6bd06a8 100644 --- a/trunk/drivers/mtd/nand/mxc_nand.c +++ b/trunk/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;