From: Minghao Chi (CGEL ZTE) Date: Thu, 3 Mar 2022 01:48:56 +0000 (+0000) Subject: clk: Use of_device_get_match_data() X-Git-Tag: v5.18-rc1~61^2~2^5~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cde8e3ae3d374bf7826d87bcb6b28fb334dcaf82;p=thirdparty%2Fkernel%2Flinux.git clk: Use of_device_get_match_data() Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) Link: https://lore.kernel.org/r/20220303014856.2059307-1-chi.minghao@zte.com.cn Acked-by: Neil Armstrong Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/clk-oxnas.c b/drivers/clk/clk-oxnas.c index 78d5ea669fea7..cda5e258355bc 100644 --- a/drivers/clk/clk-oxnas.c +++ b/drivers/clk/clk-oxnas.c @@ -209,15 +209,11 @@ static int oxnas_stdclk_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; const struct oxnas_stdclk_data *data; - const struct of_device_id *id; struct regmap *regmap; int ret; int i; - id = of_match_device(oxnas_stdclk_dt_ids, &pdev->dev); - if (!id) - return -ENODEV; - data = id->data; + data = of_device_get_match_data(&pdev->dev); regmap = syscon_node_to_regmap(of_get_parent(np)); if (IS_ERR(regmap)) {