summaryrefslogtreecommitdiff
path: root/drivers/clk/davinci/da8xx-cfgchip.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-10-07 00:39:58 +0300
committerStephen Boyd <sboyd@kernel.org>2023-10-24 06:16:21 +0300
commit409c39ec92a35e3708f5b5798c78eae78512cd71 (patch)
treefce942519c2e665033d29f497bc8763d7a1fb559 /drivers/clk/davinci/da8xx-cfgchip.c
parentfaf6b92ee0091ff7a7bba03a1726a1a97112e9db (diff)
downloadlinux-409c39ec92a35e3708f5b5798c78eae78512cd71.tar.xz
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/davinci/da8xx-cfgchip.c')
-rw-r--r--drivers/clk/davinci/da8xx-cfgchip.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/clk/davinci/da8xx-cfgchip.c b/drivers/clk/davinci/da8xx-cfgchip.c
index e5b2cdfe88ce..ad2d0df43dc6 100644
--- a/drivers/clk/davinci/da8xx-cfgchip.c
+++ b/drivers/clk/davinci/da8xx-cfgchip.c
@@ -11,10 +11,10 @@
#include <linux/init.h>
#include <linux/mfd/da8xx-cfgchip.h>
#include <linux/mfd/syscon.h>
-#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/platform_data/clk-da8xx-cfgchip.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/slab.h>
@@ -744,15 +744,13 @@ static int da8xx_cfgchip_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct da8xx_cfgchip_clk_platform_data *pdata = dev->platform_data;
- const struct of_device_id *of_id;
da8xx_cfgchip_init clk_init = NULL;
struct regmap *regmap = NULL;
- of_id = of_match_device(da8xx_cfgchip_of_match, dev);
- if (of_id) {
+ clk_init = device_get_match_data(dev);
+ if (clk_init) {
struct device_node *parent;
- clk_init = of_id->data;
parent = of_get_parent(dev->of_node);
regmap = syscon_node_to_regmap(parent);
of_node_put(parent);