summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-09-30 19:21:37 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-09-30 19:21:37 +0000
commitd7ef8c12f83ba03c9cbf557d7b7cc90642ff786e (patch)
treed568ff3a12323c2a83ec6834ec6d42eac0a80426
parentbe01920ddc76eb69eb3e34a29fe87a09af198cec (diff)
typecast vga_pci_match to cgmatch_t
compare pci tags w/ bcmp
-rw-r--r--sys/arch/alpha/pci/vga_pci.c8
-rw-r--r--sys/dev/pci/vga_pci.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/arch/alpha/pci/vga_pci.c b/sys/arch/alpha/pci/vga_pci.c
index 68c0c715878..270751d482e 100644
--- a/sys/arch/alpha/pci/vga_pci.c
+++ b/sys/arch/alpha/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 {
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 {