aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pl022.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2012-10-17 08:27:16 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-10-17 09:14:24 -0400
commit4964a26df72c4a82e56c6b40818648d54bde93cc (patch)
treeeb20938684cf5dac86c64751dae83c1b2957a008 /drivers/spi/spi-pl022.c
parent0df349945752bf04cee52babf266bbf1f4812193 (diff)
spi/pl022: Activate resourses before deactivate them in suspend
To be able to deactivate resourses in suspend, the resourses must first be surely active. This is done with a pm_runtime_get_sync. Once the resourses are restored to active state again in resume, the runtime pm usage count can be decreased with a pm_runtime_put. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/spi/spi-pl022.c')
-rw-r--r--drivers/spi/spi-pl022.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index a9106c936ed..c220c234627 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2349,6 +2349,8 @@ static int pl022_suspend(struct device *dev)
2349 dev_warn(dev, "cannot suspend master\n"); 2349 dev_warn(dev, "cannot suspend master\n");
2350 return ret; 2350 return ret;
2351 } 2351 }
2352
2353 pm_runtime_get_sync(dev);
2352 pl022_suspend_resources(pl022); 2354 pl022_suspend_resources(pl022);
2353 2355
2354 dev_dbg(dev, "suspended\n"); 2356 dev_dbg(dev, "suspended\n");
@@ -2361,6 +2363,7 @@ static int pl022_resume(struct device *dev)
2361 int ret; 2363 int ret;
2362 2364
2363 pl022_resume_resources(pl022); 2365 pl022_resume_resources(pl022);
2366 pm_runtime_put(dev);
2364 2367
2365 /* Start the queue running */ 2368 /* Start the queue running */
2366 ret = spi_master_resume(pl022->master); 2369 ret = spi_master_resume(pl022->master);