From 5ab714f2c464b554253adea611ae7c63e8d4fae7 Mon Sep 17 00:00:00 2001 From: Marc Balmer Date: Sat, 25 Nov 2006 20:04:48 +0000 Subject: Convert pwdog(4) over to using pci_matchbyid(). From brad, thanks. --- sys/dev/pci/pwdog.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/dev') 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 @@ -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 -- cgit v1.2.3