diff options
author | Rob Herring <robh@kernel.org> | 2023-10-06 23:39:58 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-10-24 05:16:21 +0200 |
commit | 409c39ec92a35e3708f5b5798c78eae78512cd71 (patch) | |
tree | fce942519c2e665033d29f497bc8763d7a1fb559 /drivers/clk/ti | |
parent | clk: cdce925: Extend match support for OF tables (diff) | |
download | linux-409c39ec92a35e3708f5b5798c78eae78512cd71.tar.xz linux-409c39ec92a35e3708f5b5798c78eae78512cd71.zip |
clk: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006213959.334439-1-robh@kernel.org
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> #msm part
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> # Samsung
Acked-by: David Lechner <david@lechnology.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/ti')
-rw-r--r-- | drivers/clk/ti/adpll.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/clk/ti/adpll.c b/drivers/clk/ti/adpll.c index ff42ea75cb43..6121020b4b38 100644 --- a/drivers/clk/ti/adpll.c +++ b/drivers/clk/ti/adpll.c @@ -8,7 +8,9 @@ #include <linux/io.h> #include <linux/math64.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> +#include <linux/property.h> #include <linux/string.h> #define ADPLL_PLLSS_MMR_LOCK_OFFSET 0x00 /* Managed by MPPULL */ @@ -860,24 +862,16 @@ static int ti_adpll_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; struct device *dev = &pdev->dev; - const struct of_device_id *match; - const struct ti_adpll_platform_data *pdata; struct ti_adpll_data *d; struct resource *res; int err; - match = of_match_device(ti_adpll_match, dev); - if (match) - pdata = match->data; - else - return -ENODEV; - d = devm_kzalloc(dev, sizeof(*d), GFP_KERNEL); if (!d) return -ENOMEM; d->dev = dev; d->np = node; - d->c = pdata; + d->c = device_get_match_data(dev); dev_set_drvdata(d->dev, d); spin_lock_init(&d->lock); |