Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/thorpej-cfargs]: src/sys/dev/isa - Use designated initializers for the w...



details:   https://anonhg.NetBSD.org/src/rev/b6cca7ca035c
branches:  thorpej-cfargs
changeset: 954089:b6cca7ca035c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Mar 28 20:34:44 2021 +0000

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

diffstat:

 sys/dev/isa/isa.c |  17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r ad88324390dc -r b6cca7ca035c sys/dev/isa/isa.c
--- a/sys/dev/isa/isa.c Sun Mar 28 20:33:46 2021 +0000
+++ b/sys/dev/isa/isa.c Sun Mar 28 20:34:44 2021 +0000
@@ -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 @@
        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 @@
                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 @@
 
        config_search(self, NULL,
            CFARG_SUBMATCH, isasearch,
-           CFARG_IATTR, ifattr,
            CFARG_LOCATORS, locs,
            CFARG_EOL);
        return (0);



Home | Main Index | Thread Index | Old Index