svn commit: r331886 - in stable/11/sys/dev: fdt uart usb/net
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Mon Apr 2 20:54:34 UTC 2018
Author: gonzo
Date: Mon Apr 2 20:54:33 2018
New Revision: 331886
URL: https://svnweb.freebsd.org/changeset/base/331886
Log:
MFC r308533 by andrew:
Use ofw_bus_node_is_compatible in more drivers used on arm.
Sponsored by: ABT Systems Ltd
Modified:
stable/11/sys/dev/fdt/fdt_arm_platform.c
stable/11/sys/dev/uart/uart_bus_fdt.c
stable/11/sys/dev/usb/net/if_smsc.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/fdt/fdt_arm_platform.c
==============================================================================
--- stable/11/sys/dev/fdt/fdt_arm_platform.c Mon Apr 2 20:47:55 2018 (r331885)
+++ stable/11/sys/dev/fdt/fdt_arm_platform.c Mon Apr 2 20:54:33 2018 (r331886)
@@ -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: stable/11/sys/dev/uart/uart_bus_fdt.c
==============================================================================
--- stable/11/sys/dev/uart/uart_bus_fdt.c Mon Apr 2 20:47:55 2018 (r331885)
+++ stable/11/sys/dev/uart/uart_bus_fdt.c Mon Apr 2 20:54:33 2018 (r331886)
@@ -123,7 +123,7 @@ uart_fdt_find_compatible(phandle_t node, const struct
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: stable/11/sys/dev/usb/net/if_smsc.c
==============================================================================
--- stable/11/sys/dev/usb/net/if_smsc.c Mon Apr 2 20:47:55 2018 (r331885)
+++ stable/11/sys/dev/usb/net/if_smsc.c Mon Apr 2 20:54:33 2018 (r331886)
@@ -1568,8 +1568,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-stable
mailing list