summaryrefslogtreecommitdiff
path: root/sys/dev/pci/mbg.c
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2006-12-30 23:44:59 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2006-12-30 23:44:59 +0000
commit64dfe7a539fee7a4ca51ad6b1f4eecbbc1653970 (patch)
treef9ae7f95990bb2355ea07d90e24d6fd340072022 /sys/dev/pci/mbg.c
parent6ae99dbd38e0269e8af903875b78848b7ab22240 (diff)
Use the same PCI product name strings we have in pcidevs_data.h for the
timedelta sensor desc field and not the full description produced by pci_devinfo() (which gets truncated in this case). There is no need to have the PCi vendor string in the description as this is apparent from the driver name already. problem noticed by deraadt.
Diffstat (limited to 'sys/dev/pci/mbg.c')
-rw-r--r--sys/dev/pci/mbg.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/pci/mbg.c b/sys/dev/pci/mbg.c
index a27d6b1177f..1270486d0a3 100644
--- a/sys/dev/pci/mbg.c
+++ b/sys/dev/pci/mbg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbg.c,v 1.9 2006/12/29 16:26:18 mbalmer Exp $ */
+/* $OpenBSD: mbg.c,v 1.10 2006/12/30 23:44:58 mbalmer Exp $ */
/*
* Copyright (c) 2006 Marc Balmer <mbalmer@openbsd.org>
@@ -151,11 +151,18 @@ mbg_attach(struct device *parent, struct device *self, void *aux)
switch (PCI_PRODUCT(pa->pa_id)) {
case PCI_PRODUCT_MEINBERG_PCI32:
+ strlcpy(sc->sc_timedelta.desc, "PCI32",
+ sizeof(sc->sc_timedelta.desc));
sc->sc_read = mbg_read_amcc_s5933;
break;
case PCI_PRODUCT_MEINBERG_PCI511:
- /* FALLTHROUGH */
+ strlcpy(sc->sc_timedelta.desc, "PCI511",
+ sizeof(sc->sc_timedelta.desc));
+ sc->sc_read = mbg_read_asic;
+ break;
case PCI_PRODUCT_MEINBERG_GPS170:
+ strlcpy(sc->sc_timedelta.desc, "GPS170",
+ sizeof(sc->sc_timedelta.desc));
sc->sc_read = mbg_read_asic;
break;
default:
@@ -194,13 +201,6 @@ mbg_attach(struct device *parent, struct device *self, void *aux)
sc->sc_timedelta.status = SENSOR_S_UNKNOWN;
sc->sc_timedelta.value = 0LL;
sc->sc_timedelta.flags = 0;
-#ifdef PCIVERBOSE
- pci_devinfo(pa->pa_id, pa->pa_class, 0, sc->sc_timedelta.desc,
- sizeof(sc->sc_timedelta.desc));
-#else
- strlcpy(sc->sc_timedelta.desc, "Radio clock",
- sizeof(sc->sc_timedelta.desc));
-#endif
sensor_attach(&sc->sc_sensordev, &sc->sc_timedelta);
sc->sc_signal.type = SENSOR_PERCENT;