summaryrefslogtreecommitdiff
path: root/drivers/clk/rockchip
diff options
context:
space:
mode:
authorMinghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>2022-02-21 05:01:03 +0300
committerHeiko Stuebner <heiko@sntech.de>2022-02-24 01:59:27 +0300
commit9f565399ad0739dbdeac868e40e86e80f54dc77b (patch)
tree816708dd09e9c57c0fc1d5715bfa8eeed24ee949 /drivers/clk/rockchip
parent6e69052f01d9131388cfcfaee929120118a267f4 (diff)
downloadlinux-9f565399ad0739dbdeac868e40e86e80f54dc77b.tar.xz
clk/rockchip: Use of_device_get_match_data()
Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Link: https://lore.kernel.org/r/20220221020103.1925026-1-chi.minghao@zte.com.cn Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'drivers/clk/rockchip')
-rw-r--r--drivers/clk/rockchip/clk-rk3568.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c
index 63dfbeeeb06d..606ae6cd918b 100644
--- a/drivers/clk/rockchip/clk-rk3568.c
+++ b/drivers/clk/rockchip/clk-rk3568.c
@@ -1703,14 +1703,12 @@ static const struct of_device_id clk_rk3568_match_table[] = {
static int __init clk_rk3568_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
- const struct of_device_id *match;
const struct clk_rk3568_inits *init_data;
- match = of_match_device(clk_rk3568_match_table, &pdev->dev);
- if (!match || !match->data)
+ init_data = (struct clk_rk3568_inits *)of_device_get_match_data(&pdev->dev);
+ if (!init_data)
return -EINVAL;
- init_data = match->data;
if (init_data->inits)
init_data->inits(np);