Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Sep 2014 03:46:24 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r270959 - head/sys/dev/fdt
Message-ID:  <201409020346.s823kOEO059229@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Tue Sep  2 03:46:24 2014
New Revision: 270959
URL: http://svnweb.freebsd.org/changeset/base/270959

Log:
  Use OF_xref_from_device(), not OF_xref_from_node().  Also, use bzero()
  rather than memset().

Modified:
  head/sys/dev/fdt/fdt_clock.c

Modified: head/sys/dev/fdt/fdt_clock.c
==============================================================================
--- head/sys/dev/fdt/fdt_clock.c	Tue Sep  2 03:45:01 2014	(r270958)
+++ head/sys/dev/fdt/fdt_clock.c	Tue Sep  2 03:46:24 2014	(r270959)
@@ -32,6 +32,7 @@
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/queue.h>
+#include <sys/systm.h>
 
 #include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/ofw_bus_subr.h>
@@ -119,7 +120,7 @@ fdt_clock_get_info(device_t consumer, in
 			 * override anything it wants to).
 			 */
 			clocknum = clks[n + 1];
-			memset(info, 0, sizeof(*info));
+			bzero(info, sizeof(*info));
 			info->provider = clockdev;
 			info->index = clocknum;
 			info->name = "";
@@ -148,13 +149,13 @@ void
 fdt_clock_register_provider(device_t provider)
 {
 
-	OF_device_register_xref(OF_xref_from_node(provider), provider);
+	OF_device_register_xref(OF_xref_from_device(provider), provider);
 }
 
 void
 fdt_clock_unregister_provider(device_t provider)
 {
 
-	OF_device_register_xref(OF_xref_from_node(provider), NULL);
+	OF_device_register_xref(OF_xref_from_device(provider), NULL);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409020346.s823kOEO059229>