Skip to content

Commit 777aaf3

Browse files
Minghao Chi (CGEL ZTE)krzk
authored andcommitted
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) <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 568035b commit 777aaf3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/clk/samsung/clk-exynos-clkout.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,17 @@ MODULE_DEVICE_TABLE(of, exynos_clkout_ids);
8181
static int exynos_clkout_match_parent_dev(struct device *dev, u32 *mux_mask)
8282
{
8383
const struct exynos_clkout_variant *variant;
84-
const struct of_device_id *match;
8584

8685
if (!dev->parent) {
8786
dev_err(dev, "not instantiated from MFD\n");
8887
return -EINVAL;
8988
}
9089

91-
match = of_match_device(exynos_clkout_ids, dev->parent);
92-
if (!match) {
90+
variant = of_device_get_match_data(dev->parent);
91+
if (!variant) {
9392
dev_err(dev, "cannot match parent device\n");
9493
return -EINVAL;
9594
}
96-
variant = match->data;
9795

9896
*mux_mask = variant->mux_mask;
9997

0 commit comments

Comments
 (0)