Module Name:    src
Committed By:   thorpej
Date:           Sun Mar 28 20:34:44 UTC 2021

Modified Files:
        src/sys/dev/isa [thorpej-cfargs]: isa.c

Log Message:
- Use designated initializers for the wildcard[] array in isaattach().
- No need to be explicit about interface attribute.


To generate a diff of this commit:
cvs rdiff -u -r1.138.76.3 -r1.138.76.4 src/sys/dev/isa/isa.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/isa/isa.c
diff -u src/sys/dev/isa/isa.c:1.138.76.3 src/sys/dev/isa/isa.c:1.138.76.4
--- src/sys/dev/isa/isa.c:1.138.76.3	Mon Mar 22 16:23:45 2021
+++ src/sys/dev/isa/isa.c	Sun Mar 28 20:34:44 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa.c,v 1.138.76.3 2021/03/22 16:23:45 thorpej Exp $	*/
+/*	$NetBSD: isa.c,v 1.138.76.4 2021/03/28 20:34:44 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138.76.3 2021/03/22 16:23:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138.76.4 2021/03/28 20:34:44 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -86,9 +86,13 @@ isaattach(device_t parent, device_t self
 	struct isa_softc *sc = device_private(self);
 	struct isabus_attach_args *iba = aux;
 	static const int wildcard[ISACF_NLOCS] = {
-		ISACF_PORT_DEFAULT, ISACF_SIZE_DEFAULT,
-		ISACF_IOMEM_DEFAULT, ISACF_IOSIZ_DEFAULT,
-		ISACF_IRQ_DEFAULT, ISACF_DRQ_DEFAULT, ISACF_DRQ2_DEFAULT
+		[ISACF_PORT]  = ISACF_PORT_DEFAULT,
+		[ISACF_SIZE]  = ISACF_SIZE_DEFAULT,
+		[ISACF_IOMEM] = ISACF_IOMEM_DEFAULT,
+		[ISACF_IOSIZ] = ISACF_IOSIZ_DEFAULT,
+		[ISACF_IRQ]   = ISACF_IRQ_DEFAULT,
+		[ISACF_DRQ]   = ISACF_DRQ_DEFAULT,
+		[ISACF_DRQ2]  = ISACF_DRQ2_DEFAULT,
 	};
 
 	TAILQ_INIT(&sc->sc_knowndevs);
@@ -132,7 +136,7 @@ isaattach(device_t parent, device_t self
 		isa_free_knowndevs(sc);
 
 	/* Attach all indirect-config children. */
-	isarescan(self, "isa", wildcard);
+	isarescan(self, NULL, wildcard);
 
 	if (!pmf_device_register(self, NULL, NULL))
 		aprint_error_dev(self, "couldn't establish power handler\n");
@@ -188,7 +192,6 @@ isarescan(device_t self, const char *ifa
 
 	config_search(self, NULL,
 	    CFARG_SUBMATCH, isasearch,
-	    CFARG_IATTR, ifattr,
 	    CFARG_LOCATORS, locs,
 	    CFARG_EOL);
 	return (0);

Reply via email to