summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/vga_pci.c
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>1997-09-30 19:21:36 +0000
committermickey <mickey@openbsd.org>1997-09-30 19:21:36 +0000
commit07398360efbe01cbeb1c6acc9c382f2b40df24e6 (patch)
tree72728dd7c60a8028610609f7d9c8e46e6ae1adf8 /sys/dev/pci/vga_pci.c
parentAdded some missing files. -moj (diff)
downloadwireguard-openbsd-07398360efbe01cbeb1c6acc9c382f2b40df24e6.tar.xz
wireguard-openbsd-07398360efbe01cbeb1c6acc9c382f2b40df24e6.zip
typecast vga_pci_match to cgmatch_t
compare pci tags w/ bcmp
Diffstat (limited to 'sys/dev/pci/vga_pci.c')
-rw-r--r--sys/dev/pci/vga_pci.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index 68c0c715878..270751d482e 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -33,7 +33,9 @@
#include <sys/device.h>
#include <sys/malloc.h>
+#ifndef i386
#include <machine/autoconf.h>
+#endif
#include <machine/pte.h>
#include <dev/pci/pcireg.h>
@@ -61,7 +63,7 @@ int vgapcimmap __P((void *, off_t, int));
int vgapciioctl __P((void *, u_long, caddr_t, int, struct proc *));
struct cfattach vga_pci_ca = {
- sizeof(struct vga_pci_softc), vga_pci_match, vga_pci_attach,
+ sizeof(struct vga_pci_softc), (cfmatch_t)vga_pci_match, vga_pci_attach,
};
pcitag_t vga_pci_console_tag;
@@ -97,7 +99,7 @@ vga_pci_match(parent, match, aux)
return (0);
/* If it's the console, we have a winner! */
- if (pa->pa_tag == vga_pci_console_tag)
+ if (!bcmp(&pa->pa_tag, &vga_pci_console_tag, sizeof(pa->pa_tag)))
return (1);
/*
@@ -120,7 +122,7 @@ vga_pci_attach(parent, self, aux)
char devinfo[256];
int console;
- console = (pa->pa_tag == vga_pci_console_tag);
+ console = (!bcmp(&pa->pa_tag, &vga_pci_console_tag, sizeof(pa->pa_tag)));
if (console)
vc = sc->sc_vc = &vga_pci_console_vc;
else {