diff options
author | 2016-05-19 09:18:42 +0000 | |
---|---|---|
committer | 2016-05-19 09:18:42 +0000 | |
commit | 268c776f3837c9c5643c3dafb2f3e53b4df8fe7e (patch) | |
tree | e6669ea0ef7ccffa557b5b9761029edd145105bd | |
parent | Implement OF_is_compatible(9). (diff) | |
download | wireguard-openbsd-268c776f3837c9c5643c3dafb2f3e53b4df8fe7e.tar.xz wireguard-openbsd-268c776f3837c9c5643c3dafb2f3e53b4df8fe7e.zip |
Use OF_is_compatible(9). Simplifies the code and should make pci within
a guest domain on a Fujitsu M10 work.
-rw-r--r-- | sys/arch/sparc64/dev/vpci.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/arch/sparc64/dev/vpci.c b/sys/arch/sparc64/dev/vpci.c index 354eb340572..7a126e35e66 100644 --- a/sys/arch/sparc64/dev/vpci.c +++ b/sys/arch/sparc64/dev/vpci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vpci.c,v 1.19 2015/09/27 11:29:20 kettenis Exp $ */ +/* $OpenBSD: vpci.c,v 1.20 2016/05/19 09:18:42 kettenis Exp $ */ /* * Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org> * @@ -135,18 +135,11 @@ int vpci_match(struct device *parent, void *match, void *aux) { struct mainbus_attach_args *ma = aux; - char compat[32]; if (strcmp(ma->ma_name, "pci") != 0) return (0); - if (OF_getprop(ma->ma_node, "compatible", compat, sizeof(compat)) == -1) - return (0); - - if (strcmp(compat, "SUNW,sun4v-pci") == 0) - return (1); - - return (0); + return OF_is_compatible(ma->ma_node, "SUNW,sun4v-pci"); } void |