diff options
author | Marc Balmer <mbalmer@cvs.openbsd.org> | 2006-11-25 20:47:18 +0000 |
---|---|---|
committer | Marc Balmer <mbalmer@cvs.openbsd.org> | 2006-11-25 20:47:18 +0000 |
commit | 4a8fffc2c46dbfd613d4087fd3dd3f0abce21d54 (patch) | |
tree | a474de2566dafc203e7caae9f7cccb720ce5d055 /sys/dev/pci/wdt.c | |
parent | 3a0fbc8f42b707c319b109535f01178a4af9e2e9 (diff) |
use pci_matchbyid() here, too.
Diffstat (limited to 'sys/dev/pci/wdt.c')
-rw-r--r-- | sys/dev/pci/wdt.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/pci/wdt.c b/sys/dev/pci/wdt.c index 707cc45c684..1a552013679 100644 --- a/sys/dev/pci/wdt.c +++ b/sys/dev/pci/wdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdt.c,v 1.13 2006/07/09 21:44:06 mk Exp $ */ +/* $OpenBSD: wdt.c,v 1.14 2006/11/25 20:47:17 mbalmer Exp $ */ /*- * Copyright (c) 1998,1999 Alex Nash @@ -75,6 +75,10 @@ struct cfdriver wdt_cd = { NULL, "wdt", DV_DULL }; +const struct pci_matchid wdt_devices[] = { + { PCI_VENDOR_INDCOMPSRC, PCI_PRODUCT_INDCOMPSRC_WDT50x } +}; + /* * 8254 counter mappings */ @@ -103,13 +107,8 @@ struct cfdriver wdt_cd = { int wdtprobe(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_INDCOMPSRC || - PCI_PRODUCT(pa->pa_id) != PCI_PRODUCT_INDCOMPSRC_WDT50x) - return(0); - - return(1); + return (pci_matchbyid((struct pci_attach_args *)aux, wdt_devices, + sizeof(wdt_devices)/sizeof(wdt_devices[0]))); } void |