summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-10-09 02:00:58 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-10-09 02:00:58 +0000
commit0175ec2629ba0aa594306ca879c7fa75ecfecef0 (patch)
tree7c9f7121cc799c1933cad4be9e3f35c6f105b972 /sys/dev
parent7db3a0c0925ca6ac71d356c4650828b68cb2887f (diff)
use pci_matchbyid().
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_lge.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c
index 28352838590..3dfc7a6b365 100644
--- a/sys/dev/pci/if_lge.c
+++ b/sys/dev/pci/if_lge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lge.c,v 1.32 2005/10/08 23:38:52 brad Exp $ */
+/* $OpenBSD: if_lge.c,v 1.33 2005/10/09 02:00:57 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -176,6 +176,10 @@ int lgedebug = 0;
#define DPRINTFN(n,x)
#endif
+const struct pci_matchid lge_devices[] = {
+ { PCI_VENDOR_LEVEL1, PCI_PRODUCT_LEVEL1_LXT1001 },
+};
+
#define LGE_SETBIT(sc, reg, x) \
CSR_WRITE_4(sc, reg, \
CSR_READ_4(sc, reg) | (x))
@@ -389,13 +393,8 @@ lge_reset(struct lge_softc *sc)
int
lge_probe(struct device *parent, void *match, void *aux)
{
- struct pci_attach_args *pa = (struct pci_attach_args *)aux;
-
- if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_LEVEL1 &&
- PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_LEVEL1_LXT1001)
- return (1);
-
- return (0);
+ return (pci_matchbyid((struct pci_attach_args *)aux, lge_devices,
+ sizeof(lge_devices)/sizeof(lge_devices[0])));
}
/*