[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1411575342-31048-14-git-send-email-vinod.koul@intel.com>
Date: Wed, 24 Sep 2014 21:45:03 +0530
From: Vinod Koul <vinod.koul@...el.com>
To: linux-kernel@...r.kernel.org
Cc: subhransu.s.prusty@...el.com, vinod.koul@...el.com,
Tomas Winkler <tomas.winkler@...el.com>
Subject: [PATCH 13/27] mei: use pm_runtime_last_busy_and_autosuspend helper
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
coding the same code
Signed-off-by: Vinod Koul <vinod.koul@...el.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists