diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-04-14 09:47:02 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2014-04-24 01:00:36 -0400 |
commit | 5fbba0805165a4883c60cf159f272dd0d7205c44 (patch) | |
tree | ba2e279a07e6cbd8fecf26bfecad626adb044acc /arch/arm/mach-mvebu/coherency.c | |
parent | 5686a1e5aa436c49187a60052d5885fb1f541ce6 (diff) |
ARM: mvebu: ARM: mvebu: use of_find_matching_node_and_match() in coherency.c
In the mach-mvebu coherency code, instead of using
of_find_matching_node() and then of_match_node(), directly use the
of_find_matching_node_and_match() which does both at once.
We take this opportunity to also simplify the initialization of the
"type" variable.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1397483228-25625-5-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-mvebu/coherency.c')
-rw-r--r-- | arch/arm/mach-mvebu/coherency.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c index 296cf14f08a4..862100f7c836 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c | |||
@@ -148,14 +148,11 @@ static void __init armada_370_coherency_init(struct device_node *np) | |||
148 | static int coherency_type(void) | 148 | static int coherency_type(void) |
149 | { | 149 | { |
150 | struct device_node *np; | 150 | struct device_node *np; |
151 | const struct of_device_id *match; | ||
151 | 152 | ||
152 | np = of_find_matching_node(NULL, of_coherency_table); | 153 | np = of_find_matching_node_and_match(NULL, of_coherency_table, &match); |
153 | if (np) { | 154 | if (np) { |
154 | const struct of_device_id *match = | 155 | int type = (int) match->data; |
155 | of_match_node(of_coherency_table, np); | ||
156 | int type; | ||
157 | |||
158 | type = (int) match->data; | ||
159 | 156 | ||
160 | /* Armada 370/XP coherency works in both UP and SMP */ | 157 | /* Armada 370/XP coherency works in both UP and SMP */ |
161 | if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP) | 158 | if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP) |