svn commit: r308533 - in head/sys/dev: fdt uart usb/net

Andrew Turner andrew at FreeBSD.org
Fri Nov 11 15:42:14 UTC 2016


Author: andrew
Date: Fri Nov 11 15:42:12 2016
New Revision: 308533
URL: https://svnweb.freebsd.org/changeset/base/308533

Log:
  Use ofw_bus_node_is_compatible in more drivers used on arm.
  
  Sponsored by:	ABT Systems Ltd

Modified:
  head/sys/dev/fdt/fdt_arm_platform.c
  head/sys/dev/uart/uart_bus_fdt.c
  head/sys/dev/usb/net/if_smsc.c

Modified: head/sys/dev/fdt/fdt_arm_platform.c
==============================================================================
--- head/sys/dev/fdt/fdt_arm_platform.c	Fri Nov 11 15:16:37 2016	(r308532)
+++ head/sys/dev/fdt/fdt_arm_platform.c	Fri Nov 11 15:42:12 2016	(r308533)
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
 #include <arm/include/platformvar.h>
 
 #include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus_subr.h>
 #include <dev/fdt/fdt_common.h>
 
 #include "platform_if.h"
@@ -58,7 +59,7 @@ fdt_platform_probe(platform_t plat)
 	/* Is the device is compatible? */
 	root = OF_finddevice("/");
 	compat = FDT_PLATFORM(plat)->fdt_compatible;
-	if (fdt_is_compatible(root, compat) != 0)
+	if (ofw_bus_node_is_compatible(root, compat) != 0)
 		return 0;
 
 	/* Not compatible, return an error */

Modified: head/sys/dev/uart/uart_bus_fdt.c
==============================================================================
--- head/sys/dev/uart/uart_bus_fdt.c	Fri Nov 11 15:16:37 2016	(r308532)
+++ head/sys/dev/uart/uart_bus_fdt.c	Fri Nov 11 15:42:12 2016	(r308533)
@@ -123,7 +123,7 @@ uart_fdt_find_compatible(phandle_t node,
 	const struct ofw_compat_data *ocd;
 
 	for (ocd = cd; ocd->ocd_str != NULL; ocd++) {
-		if (fdt_is_compatible(node, ocd->ocd_str))
+		if (ofw_bus_node_is_compatible(node, ocd->ocd_str))
 			return (ocd);
 	}
 	return (NULL);

Modified: head/sys/dev/usb/net/if_smsc.c
==============================================================================
--- head/sys/dev/usb/net/if_smsc.c	Fri Nov 11 15:16:37 2016	(r308532)
+++ head/sys/dev/usb/net/if_smsc.c	Fri Nov 11 15:42:12 2016	(r308533)
@@ -1566,8 +1566,8 @@ smsc_fdt_find_eth_node(phandle_t start)
 
 	/* Traverse through entire tree to find usb ethernet nodes. */
 	for (node = OF_child(start); node != 0; node = OF_peer(node)) {
-		if (fdt_is_compatible(node, "net,ethernet") &&
-		    fdt_is_compatible(node, "usb,device"))
+		if (ofw_bus_node_is_compatible(node, "net,ethernet") &&
+		    ofw_bus_node_is_compatible(node, "usb,device"))
 			return (node);
 		child = smsc_fdt_find_eth_node(node);
 		if (child != -1)


More information about the svn-src-head mailing list