Module Name:    src
Committed By:   uwe
Date:           Wed Oct  6 18:41:34 UTC 2021

Modified Files:
        src/sys/dev/acpi: wss_acpi.c

Log Message:
Fix KASSERT triggered when attaching opl at wss.

wss has two attributes, "wss" and "audiobus", and this call didn't
specify an iattr for opl to attach to.  config_search_internal asserts
that when no iattr is specified, the parent should only have one.

The same problem probably exists for other wss attachments, as opl is
not attached from wssattach, but from each wss_*_attach, so they need
a similar change.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/acpi/wss_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/wss_acpi.c
diff -u src/sys/dev/acpi/wss_acpi.c:1.35 src/sys/dev/acpi/wss_acpi.c:1.36
--- src/sys/dev/acpi/wss_acpi.c:1.35	Sat Aug  7 16:19:09 2021
+++ src/sys/dev/acpi/wss_acpi.c	Wed Oct  6 18:41:34 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: wss_acpi.c,v 1.35 2021/08/07 16:19:09 thorpej Exp $ */
+/* $NetBSD: wss_acpi.c,v 1.36 2021/10/06 18:41:34 uwe Exp $ */
 
 /*
  * Copyright (c) 2002 Jared D. McNeill <jmcne...@invisible.ca>
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.35 2021/08/07 16:19:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.36 2021/10/06 18:41:34 uwe Exp $");
 
 #include <sys/param.h>
 #include <sys/audioio.h>
@@ -187,7 +187,7 @@ wss_acpi_attach(device_t parent, device_
 	arg.type = AUDIODEV_TYPE_OPL;
 	arg.hwif = 0;
 	arg.hdl = 0;
-	config_found(self, &arg, audioprint, CFARGS_NONE);
+	config_found(self, &arg, audioprint, CFARGS(.iattr = "wss"));
 
  out:
 	acpi_resource_cleanup(&res);

Reply via email to