mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
clk: qcom: use devm_*() API for virtio clock provider registration
Use devm_*() API because resource will be automatically released at device exit. Change-Id: Ide9c77e3e938b780daed225cd14fd45410e80e86 Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
This commit is contained in:
parent
4afb66961f
commit
ddd7c36e0d
1 changed files with 2 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "%s: " fmt, __func__
|
||||
|
|
@ -553,7 +553,7 @@ static int virtio_clk_probe(struct virtio_device *vdev)
|
|||
}
|
||||
}
|
||||
|
||||
ret = of_clk_add_hw_provider(vdev->dev.parent->of_node,
|
||||
ret = devm_of_clk_add_hw_provider(vdev->dev.parent,
|
||||
of_clk_hw_virtio_get, vclk);
|
||||
if (ret) {
|
||||
dev_err(&vdev->dev, "failed to add clock provider\n");
|
||||
|
|
@ -577,7 +577,6 @@ static int virtio_clk_probe(struct virtio_device *vdev)
|
|||
return 0;
|
||||
|
||||
err_rst_register:
|
||||
of_clk_del_provider(vdev->dev.parent->of_node);
|
||||
err_clk_register:
|
||||
err_kcalloc:
|
||||
err_find_desc:
|
||||
|
|
|
|||
Loading…
Reference in a new issue