From 076b76e87199565be52f16bbe06872537d494e23 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Mon, 24 Sep 2012 08:23:05 +0000 Subject: [PATCH] Fix panic caused by wrong pointer dereference, left after pin sense rewrite at r230551. Also while there, make sense polling use reported for each node separately instead of reporting accumulated total status. Submitted by: Barbara (1) MFC after: 3 days --- sys/dev/sound/pci/hda/hdaa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 3659f4b26d6a..3fc948b6741f 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -627,7 +627,7 @@ hdaa_sense_init(struct hdaa_devinfo *devinfo) (HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0) { device_printf(devinfo->dev, "No presence detection support at nid %d\n", - as[i].pins[15]); + w->nid); } else { if (w->unsol < 0) poll = 1; @@ -636,7 +636,7 @@ hdaa_sense_init(struct hdaa_devinfo *devinfo) "Headphones redirection for " "association %d nid=%d using %s.\n", w->bindas, w->nid, - (poll != 0) ? "polling" : + (w->unsol < 0) ? "polling" : "unsolicited responses"); ); };