From 1e2b39a3f2fdc80f9b44f310ab4a49791486866b Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 10 Feb 2016 15:56:52 +0000 Subject: [PATCH] Use OF_getencprop to read a property, it already handles the endian conversion so we don't need to pass the data through fdt32_to_cpu. --- sys/arm/arm/generic_timer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index fd1f029ae193..973920817014 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -361,11 +361,8 @@ arm_tmr_attach(device_t dev) /* Get the base clock frequency */ node = ofw_bus_get_node(dev); if (node > 0) { - error = OF_getprop(node, "clock-frequency", &clock, + error = OF_getencprop(node, "clock-frequency", &clock, sizeof(clock)); - if (error > 0) { - sc->clkfreq = fdt32_to_cpu(clock); - } } #endif