Thread (3 messages) 3 messages, 3 authors, 2021-06-02
STALE1944d

[PATCH -next] Bluetooth: btmtkuart: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

From: Zhang Qilong <hidden>
Date: 2021-05-31 14:14:25
Subsystem: bluetooth drivers, mediatek bluetooth driver, the rest · Maintainers: Marcel Holtmann, Luiz Augusto von Dentz, Sean Wang, Linus Torvalds

Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Signed-off-by: Zhang Qilong <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help