diff options
author | Rob Herring <robh@kernel.org> | 2023-10-06 16:39:58 -0500 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-10-23 20:16:21 -0700 |
commit | 409c39ec92a35e3708f5b5798c78eae78512cd71 (patch) | |
tree | fce942519c2e665033d29f497bc8763d7a1fb559 /drivers/clk/qcom/gcc-msm8960.c | |
parent | faf6b92ee0091ff7a7bba03a1726a1a97112e9db (diff) | |
download | linux-409c39ec92a35e3708f5b5798c78eae78512cd71.tar.gz linux-409c39ec92a35e3708f5b5798c78eae78512cd71.tar.bz2 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/qcom/gcc-msm8960.c')
-rw-r--r-- | drivers/clk/qcom/gcc-msm8960.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index dbc7093ab9cc..6236a458e4eb 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b/drivers/clk/qcom/gcc-msm8960.c @@ -7,9 +7,10 @@ #include <linux/bitops.h> #include <linux/err.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/of_platform.h> #include <linux/clk-provider.h> #include <linux/regmap.h> #include <linux/reset-controller.h> @@ -3716,14 +3717,10 @@ MODULE_DEVICE_TABLE(of, gcc_msm8960_match_table); static int gcc_msm8960_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - const struct of_device_id *match; struct platform_device *tsens; + const struct qcom_cc_desc *desc = device_get_match_data(dev); int ret; - match = of_match_device(gcc_msm8960_match_table, &pdev->dev); - if (!match) - return -EINVAL; - ret = qcom_cc_register_board_clk(dev, "cxo_board", "cxo", 19200000); if (ret) return ret; @@ -3732,11 +3729,11 @@ static int gcc_msm8960_probe(struct platform_device *pdev) if (ret) return ret; - ret = qcom_cc_probe(pdev, match->data); + ret = qcom_cc_probe(pdev, desc); if (ret) return ret; - if (match->data == &gcc_apq8064_desc) { + if (desc == &gcc_apq8064_desc) { hfpll1.d = &hfpll1_8064_data; hfpll_l2.d = &hfpll_l2_8064_data; } |