diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-09-30 19:21:37 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-09-30 19:21:37 +0000 |
commit | d7ef8c12f83ba03c9cbf557d7b7cc90642ff786e (patch) | |
tree | d568ff3a12323c2a83ec6834ec6d42eac0a80426 /sys/dev/pci/vga_pci.c | |
parent | be01920ddc76eb69eb3e34a29fe87a09af198cec (diff) |
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.c | 8 |
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 { |