aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2014-01-07 05:45:07 -0500
committerMichal Simek <michal.simek@xilinx.com>2014-01-21 02:28:20 -0500
commit21ecc1f1d2e01ddbd75c3db208236628474a43e1 (patch)
tree97e473c4a84c437623480b68230330a9df3c02f5
parentfd43769ee5c3c6b4d702b358ea472581b0976ed3 (diff)
microblaze: Simplify fcpu helper function
Use of_property_read_u32() instead of all of_get_property with big endian conversion. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r--arch/microblaze/include/asm/cpuinfo.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/microblaze/include/asm/cpuinfo.h b/arch/microblaze/include/asm/cpuinfo.h
index 7d6831ac8a46..7161fb575861 100644
--- a/arch/microblaze/include/asm/cpuinfo.h
+++ b/arch/microblaze/include/asm/cpuinfo.h
@@ -97,9 +97,11 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu);
97 97
98static inline unsigned int fcpu(struct device_node *cpu, char *n) 98static inline unsigned int fcpu(struct device_node *cpu, char *n)
99{ 99{
100 const __be32 *val; 100 u32 val = 0;
101 return (val = of_get_property(cpu, n, NULL)) ? 101
102 be32_to_cpup(val) : 0; 102 of_property_read_u32(cpu, n, &val);
103
104 return val;
103} 105}
104 106
105#endif /* _ASM_MICROBLAZE_CPUINFO_H */ 107#endif /* _ASM_MICROBLAZE_CPUINFO_H */