Author: andrew
Date: Wed Feb 10 15:56:52 2016
New Revision: 295470
URL: https://svnweb.freebsd.org/changeset/base/295470

Log:
  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.

Modified:
  head/sys/arm/arm/generic_timer.c

Modified: head/sys/arm/arm/generic_timer.c
==============================================================================
--- head/sys/arm/arm/generic_timer.c    Wed Feb 10 15:39:59 2016        
(r295469)
+++ head/sys/arm/arm/generic_timer.c    Wed Feb 10 15:56:52 2016        
(r295470)
@@ -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
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to