diff options
author | Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> | 2022-03-07 03:35:46 +0000 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-08-23 08:51:49 +0300 |
commit | 777aaf3d1daf793461269b49c063aca1cee06a44 (patch) | |
tree | c98f9b99754d6e44cfae45a09d092aaef1adab9e /drivers/clk/samsung | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) | |
download | linux-777aaf3d1daf793461269b49c063aca1cee06a44.tar.gz linux-777aaf3d1daf793461269b49c063aca1cee06a44.tar.bz2 linux-777aaf3d1daf793461269b49c063aca1cee06a44.zip |
clk: samsung: exynos-clkout: Use of_device_get_match_data()
Use of_device_get_match_data() to simplify the code.
Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220307033546.2075097-1-chi.minghao@zte.com.cn
Diffstat (limited to 'drivers/clk/samsung')
-rw-r--r-- | drivers/clk/samsung/clk-exynos-clkout.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c index e6d6cbf8c4e6..273f77d54dab 100644 --- a/drivers/clk/samsung/clk-exynos-clkout.c +++ b/drivers/clk/samsung/clk-exynos-clkout.c @@ -81,19 +81,17 @@ MODULE_DEVICE_TABLE(of, exynos_clkout_ids); static int exynos_clkout_match_parent_dev(struct device *dev, u32 *mux_mask) { const struct exynos_clkout_variant *variant; - const struct of_device_id *match; if (!dev->parent) { dev_err(dev, "not instantiated from MFD\n"); return -EINVAL; } - match = of_match_device(exynos_clkout_ids, dev->parent); - if (!match) { + variant = of_device_get_match_data(dev->parent); + if (!variant) { dev_err(dev, "cannot match parent device\n"); return -EINVAL; } - variant = match->data; *mux_mask = variant->mux_mask; |