summaryrefslogtreecommitdiffstats
path: root/drivers/clk/samsung/clk-exynos-clkout.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:35:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:35:47 +0000
commit926b6f28303f165411f8dc876c265de64059e9a9 (patch)
treefc75a8914b7694687b43740c15957e02f964364c /drivers/clk/samsung/clk-exynos-clkout.c
parentReleasing progress-linux version 6.8.9-1~progress7.99u1. (diff)
downloadlinux-926b6f28303f165411f8dc876c265de64059e9a9.tar.xz
linux-926b6f28303f165411f8dc876c265de64059e9a9.zip
Merging upstream version 6.8.11.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/clk/samsung/clk-exynos-clkout.c')
-rw-r--r--drivers/clk/samsung/clk-exynos-clkout.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
index 3484e6cc8..503c6f5b2 100644
--- a/drivers/clk/samsung/clk-exynos-clkout.c
+++ b/drivers/clk/samsung/clk-exynos-clkout.c
@@ -13,9 +13,9 @@
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
+#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
-#include <linux/property.h>
#define EXYNOS_CLKOUT_NR_CLKS 1
#define EXYNOS_CLKOUT_PARENTS 32
@@ -84,17 +84,24 @@ 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;
}
- variant = device_get_match_data(dev->parent);
- if (!variant) {
+ /*
+ * 'exynos_clkout_ids' arrays is not the ids array matched by
+ * the dev->parent driver, so of_device_get_match_data() or
+ * device_get_match_data() cannot be used here.
+ */
+ match = of_match_device(exynos_clkout_ids, dev->parent);
+ if (!match) {
dev_err(dev, "cannot match parent device\n");
return -EINVAL;
}
+ variant = match->data;
*mux_mask = variant->mux_mask;