lkml.org 
[lkml]   [2014]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 24/27] spi: core: use pm_runtime_last_busy_and_autosuspend helper
Date
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
coding the same code

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
drivers/spi/spi.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index e0531ba..6ec5330 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -893,10 +893,8 @@ static void spi_pump_messages(struct kthread_work *work)
master->unprepare_transfer_hardware(master))
dev_err(&master->dev,
"failed to unprepare transfer hardware\n");
- if (master->auto_runtime_pm) {
- pm_runtime_mark_last_busy(master->dev.parent);
- pm_runtime_put_autosuspend(master->dev.parent);
- }
+ if (master->auto_runtime_pm)
+ pm_runtime_last_busy_and_autosuspend(master->dev.parent);
trace_spi_master_idle(master);
return;
}
--
1.7.0.4


\
 
 \ /
  Last update: 2014-09-24 19:21    [W:2.580 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site