Commit 51a43be9 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Stephen Boyd
Browse files

clk: at91: Use of_clk_get_parent_count() instead of open coding

parent 17bfa3f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -614,7 +614,7 @@ void __init of_at91sam9x5_clk_main_setup(struct device_node *np,
	const char *name = np->name;
	int i;

	num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells");
	num_parents = of_clk_get_parent_count(np);
	if (num_parents <= 0 || num_parents > 2)
		return;

+1 −1
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ of_at91_clk_master_setup(struct device_node *np, struct at91_pmc *pmc,
	const char *name = np->name;
	struct clk_master_characteristics *characteristics;

	num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells");
	num_parents = of_clk_get_parent_count(np);
	if (num_parents <= 0 || num_parents > MASTER_SOURCE_MAX)
		return;

+1 −1
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ of_at91_clk_prog_setup(struct device_node *np, struct at91_pmc *pmc,
	const char *name;
	struct device_node *progclknp;

	num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells");
	num_parents = of_clk_get_parent_count(np);
	if (num_parents <= 0 || num_parents > PROG_SOURCE_MAX)
		return;

+2 −2
Original line number Diff line number Diff line
@@ -373,7 +373,7 @@ void __init of_at91sam9x5_clk_slow_setup(struct device_node *np,
	const char *name = np->name;
	int i;

	num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells");
	num_parents = of_clk_get_parent_count(np);
	if (num_parents <= 0 || num_parents > 2)
		return;

@@ -451,7 +451,7 @@ void __init of_at91sam9260_clk_slow_setup(struct device_node *np,
	const char *name = np->name;
	int i;

	num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells");
	num_parents = of_clk_get_parent_count(np);
	if (num_parents != 2)
		return;

+1 −1
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ void __init of_at91sam9x5_clk_smd_setup(struct device_node *np,
	const char *parent_names[SMD_SOURCE_MAX];
	const char *name = np->name;

	num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells");
	num_parents = of_clk_get_parent_count(np);
	if (num_parents <= 0 || num_parents > SMD_SOURCE_MAX)
		return;

Loading