Deleted Added
full compact
ofw_bus_subr.c (209298) ofw_bus_subr.c (233018)
1/*-
2 * Copyright (c) 2001 - 2003 by Thomas Moestl <tmm@FreeBSD.org>.
3 * Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 - 2003 by Thomas Moestl <tmm@FreeBSD.org>.
3 * Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/ofw/ofw_bus_subr.c 209298 2010-06-18 14:06:27Z nwhitehorn $");
31__FBSDID("$FreeBSD: head/sys/dev/ofw/ofw_bus_subr.c 233018 2012-03-15 22:53:39Z nwhitehorn $");
32
33#include "opt_platform.h"
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/bus.h>
37#include <sys/errno.h>
38#include <sys/libkern.h>
39

--- 112 unchanged lines hidden (view full) ---

152{
153 phandle_t node;
154 const char *compat;
155 int len, onelen, l;
156
157 if ((compat = ofw_bus_get_compat(dev)) == NULL)
158 return (0);
159
32
33#include "opt_platform.h"
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/bus.h>
37#include <sys/errno.h>
38#include <sys/libkern.h>
39

--- 112 unchanged lines hidden (view full) ---

152{
153 phandle_t node;
154 const char *compat;
155 int len, onelen, l;
156
157 if ((compat = ofw_bus_get_compat(dev)) == NULL)
158 return (0);
159
160 if ((node = ofw_bus_get_node(dev)) == 0)
160 if ((node = ofw_bus_get_node(dev)) == -1)
161 return (0);
162
163 /* Get total 'compatible' prop len */
164 if ((len = OF_getproplen(node, "compatible")) <= 0)
165 return (0);
166
167 onelen = strlen(onecompat);
168

--- 148 unchanged lines hidden ---
161 return (0);
162
163 /* Get total 'compatible' prop len */
164 if ((len = OF_getproplen(node, "compatible")) <= 0)
165 return (0);
166
167 onelen = strlen(onecompat);
168

--- 148 unchanged lines hidden ---