diff options
author | Choi jonghwan <jhbird.choi@samsung.com> | 2010-10-14 10:03:14 -0700 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2011-11-17 17:53:57 -0800 |
commit | 2fc746cb09c282d9a049041dbaf03f281f04e1cd (patch) | |
tree | 881376585035c88a0675c548de630b4957095b86 /drivers/mtd/onenand | |
parent | 941bc45b1cd53079754946a95fe1352c5c671ac9 (diff) | |
download | kernel_samsung_aries-2fc746cb09c282d9a049041dbaf03f281f04e1cd.zip kernel_samsung_aries-2fc746cb09c282d9a049041dbaf03f281f04e1cd.tar.gz kernel_samsung_aries-2fc746cb09c282d9a049041dbaf03f281f04e1cd.tar.bz2 |
S5PC11X: ONENAND: Now onenand_resume/suspend is called duplicate, remove onenand_resume/suspend in samsung.c
Now onenand_resume/suspend is called duplicate, remove onenand_resume/suspend in samsung.c.
Onenand_resume/suspend is called by mtd. Remove s3c_pm_ops_suspend function.
Change-Id: I4bc9016610767decc4d9a7c6553cf01fdc1c21cc
Signed-off-by: Choi jonghwan <jhbird.choi@samsung.com>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 7 | ||||
-rw-r--r-- | drivers/mtd/onenand/samsung.c | 13 |
2 files changed, 6 insertions, 14 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 3aa99af..f55190a 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -992,7 +992,7 @@ static int onenand_get_device(struct mtd_info *mtd, int new_state) schedule(); remove_wait_queue(&this->wq, &wait); } - if (this->clk) + if (this->clk && new_state != FL_PM_SUSPENDED) clk_enable(this->clk); return 0; } @@ -1007,6 +1007,9 @@ static void onenand_release_device(struct mtd_info *mtd) { struct onenand_chip *this = mtd->priv; + if (this->clk && this->state != FL_PM_SUSPENDED) + clk_disable(this->clk); + if (this->state != FL_PM_SUSPENDED && this->disable) this->disable(mtd); /* Release the chip */ @@ -1014,8 +1017,6 @@ static void onenand_release_device(struct mtd_info *mtd) this->state = FL_READY; wake_up(&this->wq); spin_unlock(&this->chip_lock); - if (this->clk) - clk_disable(this->clk); } /** diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index 7ed1051..9532cc9 100644 --- a/drivers/mtd/onenand/samsung.c +++ b/drivers/mtd/onenand/samsung.c @@ -1220,28 +1220,19 @@ static int __devexit s3c_onenand_remove(struct platform_device *pdev) return 0; } -static int s3c_pm_ops_suspend(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct mtd_info *mtd = platform_get_drvdata(pdev); - struct onenand_chip *this = mtd->priv; - - this->wait(mtd, FL_PM_SUSPENDED); - return 0; -} - static int s3c_pm_ops_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct mtd_info *mtd = platform_get_drvdata(pdev); struct onenand_chip *this = mtd->priv; + clk_enable(this->clk); this->unlock_all(mtd); + clk_disable(this->clk); return 0; } static const struct dev_pm_ops s3c_pm_ops = { - .suspend = s3c_pm_ops_suspend, .resume = s3c_pm_ops_resume, }; |