All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] Bluetooth: btmtkuart: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
@ 2021-05-31 14:24 Zhang Qilong
  2021-05-31 15:27 ` [-next] " bluez.test.bot
  2021-06-02 20:07 ` [PATCH -next] " Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Zhang Qilong @ 2021-05-31 14:24 UTC (permalink / raw)
  To: sean.wang, matthias.bgg
  Cc: marcel, johan.hedberg, luiz.dentz, linux-bluetooth

Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
 drivers/bluetooth/btmtkuart.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/btmtkuart.c b/drivers/bluetooth/btmtkuart.c
index 6c40bc75fb5b..e9d91d7c0db4 100644
--- a/drivers/bluetooth/btmtkuart.c
+++ b/drivers/bluetooth/btmtkuart.c
@@ -581,11 +581,9 @@ static int btmtkuart_open(struct hci_dev *hdev)
 
 	/* Enable the power domain and clock the device requires */
 	pm_runtime_enable(dev);
-	err = pm_runtime_get_sync(dev);
-	if (err < 0) {
-		pm_runtime_put_noidle(dev);
+	err = pm_runtime_resume_and_get(dev);
+	if (err < 0)
 		goto err_disable_rpm;
-	}
 
 	err = clk_prepare_enable(bdev->clk);
 	if (err < 0)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-02 20:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31 14:24 [PATCH -next] Bluetooth: btmtkuart: using pm_runtime_resume_and_get instead of pm_runtime_get_sync Zhang Qilong
2021-05-31 15:27 ` [-next] " bluez.test.bot
2021-06-02 20:07 ` [PATCH -next] " Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.