Messages in this thread Patch in this message | | | From | Vinod Koul <> | Subject | [PATCH 13/27] mei: use pm_runtime_last_busy_and_autosuspend helper | Date | Wed, 24 Sep 2014 21:45:03 +0530 |
| |
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
| |