From d7ef8c12f83ba03c9cbf557d7b7cc90642ff786e Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Tue, 30 Sep 1997 19:21:37 +0000 Subject: typecast vga_pci_match to cgmatch_t compare pci tags w/ bcmp --- sys/arch/alpha/pci/vga_pci.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/arch/alpha/pci') 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 #include +#ifndef i386 #include +#endif #include #include @@ -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 { -- cgit v1.2.3