diff options
| author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2025-11-06 18:06:08 +0100 |
|---|---|---|
| committer | Stephen Boyd <sboyd@kernel.org> | 2025-11-10 17:02:12 -0800 |
| commit | 79d022dcad375c6ba95e78e9035c8a0630164300 (patch) | |
| tree | 4e24e6a94f286028d19bbdcd73b3442d2e3c7e3d /drivers/clk | |
| parent | 3a8660878839faadb4f1a6dd72c3179c1df56787 (diff) | |
| download | tip-79d022dcad375c6ba95e78e9035c8a0630164300.tar.gz | |
clk: sprd: sc9860: Simplify with of_device_get_match_data()
Driver's probe function matches against driver's of_device_id table,
where each entry has non-NULL match data, so of_match_node() can be
simplified with of_device_get_match_data().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[sboyd@kernel.org: Use device_get_match_data() instead, drop
printk noise]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk')
| -rw-r--r-- | drivers/clk/sprd/sc9860-clk.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/clk/sprd/sc9860-clk.c b/drivers/clk/sprd/sc9860-clk.c index cc5ed2dd826703..d7fe924fbe9717 100644 --- a/drivers/clk/sprd/sc9860-clk.c +++ b/drivers/clk/sprd/sc9860-clk.c @@ -2021,17 +2021,13 @@ MODULE_DEVICE_TABLE(of, sprd_sc9860_clk_ids); static int sc9860_clk_probe(struct platform_device *pdev) { - const struct of_device_id *match; const struct sprd_clk_desc *desc; int ret; - match = of_match_node(sprd_sc9860_clk_ids, pdev->dev.of_node); - if (!match) { - pr_err("%s: of_match_node() failed", __func__); + desc = device_get_match_data(&pdev->dev); + if (!desc) return -ENODEV; - } - desc = match->data; ret = sprd_clk_regmap_init(pdev, desc); if (ret) return ret; |
