Pārlūkot izejas kodu

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>
Michal Simek 11 gadi atpakaļ
vecāks
revīzija
21ecc1f1d2
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5 3
      arch/microblaze/include/asm/cpuinfo.h

+ 5 - 3
arch/microblaze/include/asm/cpuinfo.h

@@ -97,9 +97,11 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu);
 
 
 static inline unsigned int fcpu(struct device_node *cpu, char *n)
 static inline unsigned int fcpu(struct device_node *cpu, char *n)
 {
 {
-	const __be32 *val;
-	return (val = of_get_property(cpu, n, NULL)) ?
-							be32_to_cpup(val) : 0;
+	u32 val = 0;
+
+	of_property_read_u32(cpu, n, &val);
+
+	return val;
 }
 }
 
 
 #endif /* _ASM_MICROBLAZE_CPUINFO_H */
 #endif /* _ASM_MICROBLAZE_CPUINFO_H */