From 0175ec2629ba0aa594306ca879c7fa75ecfecef0 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 9 Oct 2005 02:00:58 +0000 Subject: use pci_matchbyid(). --- sys/dev/pci/if_lge.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'sys/dev') 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]))); } /* -- cgit v1.2.3