aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorZhang Qilong <zhangqilong3@huawei.com>2021-05-31 22:24:49 +0800
committerMarcel Holtmann <marcel@holtmann.org>2021-06-26 07:12:38 +0200
commita1b2fdf97f3659948d83ff491abbab73e591c982 (patch)
treeb6a12307d58969a667ea592938400c6ca845d6ae /drivers/bluetooth
parentBluetooth: use inclusive language in comments (diff)
downloadlinux-dev-a1b2fdf97f3659948d83ff491abbab73e591c982.tar.xz
linux-dev-a1b2fdf97f3659948d83ff491abbab73e591c982.zip
Bluetooth: btmtkuart: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Using pm_runtime_resume_and_get is more appropriate for simplifing code Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btmtkuart.c6
1 files 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)