summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2006-11-25 20:04:48 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2006-11-25 20:04:48 +0000
commit5ab714f2c464b554253adea611ae7c63e8d4fae7 (patch)
tree076e0a7b146e343c27b0338501c1123732f34c21 /sys/dev
parent5ad66ad350eb5cdb5e8237fecdf3819e41ffb82c (diff)
Convert pwdog(4) over to using pci_matchbyid().
From brad, thanks.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pwdog.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/pci/pwdog.c b/sys/dev/pci/pwdog.c
index c370e68319d..765c7c6e450 100644
--- a/sys/dev/pci/pwdog.c
+++ b/sys/dev/pci/pwdog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pwdog.c,v 1.2 2006/11/25 18:06:01 mbalmer Exp $ */
+/* $OpenBSD: pwdog.c,v 1.3 2006/11/25 20:04:47 mbalmer Exp $ */
/*
* Copyright (c) 2006 Marc Balmer <mbalmer@openbsd.org>
@@ -53,15 +53,15 @@ struct cfdriver pwdog_cd = {
NULL, "pwdog", DV_DULL
};
+const struct pci_matchid pwdog_devices[] = {
+ { PCI_VENDOR_QUANCOM, PCI_PRODUCT_QUANCOM_PWDOG1 }
+};
+
int
pwdog_probe(struct device *parent, void *match, void *aux)
{
- struct pci_attach_args *const pa = (struct pci_attach_args *)aux;
-
- if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_QUANCOM ||
- PCI_PRODUCT(pa->pa_id) != PCI_PRODUCT_QUANCOM_PWDOG1)
- return 0;
- return 1;
+ return (pci_matchbyid((struct pci_attach_args *)aux, pwdog_devices,
+ sizeof(pwdog_devices)/sizeof(pwdog_devices[0])));
}
void