diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2008-12-25 00:58:16 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2008-12-25 00:58:16 +0000 |
commit | 8f0b5c7ac3f2706274ec499368bee4d955f7e90f (patch) | |
tree | 70d349264531bd2e10f75971ec0246a88de7f64d /sys/dev/pci/azalia.c | |
parent | ac9c0595ca320fce402857173c2894849b75cecb (diff) |
before naming a widget after a pin because the widget is the only thing
the pin is connected to, make sure the pin is the only device that is
connected to the widget.
Diffstat (limited to 'sys/dev/pci/azalia.c')
-rw-r--r-- | sys/dev/pci/azalia.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index a962056c5bc..acbf4ccd9ba 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.c,v 1.94 2008/12/25 00:20:36 jakemsr Exp $ */ +/* $OpenBSD: azalia.c,v 1.95 2008/12/25 00:58:15 jakemsr Exp $ */ /* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */ /*- @@ -1688,14 +1688,20 @@ azalia_widget_sole_conn(codec_t *this, nid_t nid) } } /* connected to pin complex */ + j = -1; FOR_EACH_WIDGET(this, i) { if (this->w[i].type == COP_AWTYPE_PIN_COMPLEX && this->w[i].nconnections == 1 && this->w[i].connections[0] == nid && azalia_widget_enabled(this, this->w[i].connections[0])) { - return i; + if (j != -1) + return -1; + j = i; } } + if (j != -1) + return j; + return -1; } |