Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+5 -3
+5 -3
arch/microblaze/include/asm/cpuinfo.h
··· 97 97 98 98 static inline unsigned int fcpu(struct device_node *cpu, char *n) 99 99 { 100 - const __be32 *val; 101 - return (val = of_get_property(cpu, n, NULL)) ? 102 - be32_to_cpup(val) : 0; 100 + u32 val = 0; 101 + 102 + of_property_read_u32(cpu, n, &val); 103 + 104 + return val; 103 105 } 104 106 105 107 #endif /* _ASM_MICROBLAZE_CPUINFO_H */