Commit a1b2fdf9 authored by Zhang Qilong's avatar Zhang Qilong Committed by Marcel Holtmann
Browse files

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: default avatarZhang Qilong <zhangqilong3@huawei.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 67ffb185
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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)