diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-05-16 21:26:55 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-05-16 21:26:55 +0000 |
commit | 19db62966fe6f29d48defd6fe3f073852c979359 (patch) | |
tree | 4edfc2d61c12c78d1183277fc682cd6ecf923615 /sys | |
parent | 0c4de3e597a810cb7cd15be2f8ad5ff160f1e8a5 (diff) |
Use OF_is_compatible(9) here.
ok patrick@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm/simplebus/simplebus.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/arch/arm/simplebus/simplebus.c b/sys/arch/arm/simplebus/simplebus.c index d87044b2e02..059ae694fc0 100644 --- a/sys/arch/arm/simplebus/simplebus.c +++ b/sys/arch/arm/simplebus/simplebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: simplebus.c,v 1.1 2016/05/02 08:15:55 patrick Exp $ */ +/* $OpenBSD: simplebus.c,v 1.2 2016/05/16 21:26:54 kettenis Exp $ */ /* * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se> * @@ -52,16 +52,11 @@ int simplebus_match(struct device *parent, void *cfdata, void *aux) { struct fdt_attach_args *fa = (struct fdt_attach_args *)aux; - char buffer[128]; if (fa->fa_node == 0) return (0); - if (!OF_getprop(fa->fa_node, "compatible", buffer, - sizeof(buffer))) - return (0); - - if (strcmp(buffer, "simple-bus")) + if (!OF_is_compatible(fa->fa_node, "simple-bus")) return (0); return (1); |