[PATCH 24/27] spi: core: use pm_runtime_last_busy_and_autosuspend helper

From: Vinod Koul
Date: Wed Sep 24 2014 - 12:49:05 EST


Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
coding the same code

Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/