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 13/27] mei: 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/misc/mei/client.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 324e1de..e522c01 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -519,8 +519,7 @@ int mei_cl_disconnect(struct mei_cl *cl)
mei_io_list_flush(&dev->ctrl_wr_list, cl);
free:
cl_dbg(dev, cl, "rpm: autosuspend\n");
- pm_runtime_mark_last_busy(&dev->pdev->dev);
- pm_runtime_put_autosuspend(&dev->pdev->dev);
+ pm_runtime_last_busy_and_autosuspend(&dev->pdev->dev);

mei_io_cb_free(cb);
return rets;
@@ -625,8 +624,7 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file)

out:
cl_dbg(dev, cl, "rpm: autosuspend\n");
- pm_runtime_mark_last_busy(&dev->pdev->dev);
- pm_runtime_put_autosuspend(&dev->pdev->dev);
+ pm_runtime_last_busy_and_autosuspend(&dev->pdev->dev);

mei_io_cb_free(cb);
return rets;
@@ -779,8 +777,7 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length)

out:
cl_dbg(dev, cl, "rpm: autosuspend\n");
- pm_runtime_mark_last_busy(&dev->pdev->dev);
- pm_runtime_put_autosuspend(&dev->pdev->dev);
+ pm_runtime_last_busy_and_autosuspend(&dev->pdev->dev);

if (rets)
mei_io_cb_free(cb);
@@ -978,8 +975,7 @@ out:
rets = buf->size;
err:
cl_dbg(dev, cl, "rpm: autosuspend\n");
- pm_runtime_mark_last_busy(&dev->pdev->dev);
- pm_runtime_put_autosuspend(&dev->pdev->dev);
+ pm_runtime_last_busy_and_autosuspend(&dev->pdev->dev);

return rets;
}
--
1.7.0.4


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