Source-Changes-HG archive

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

[src/thorpej-cfargs]: src/sys/arch/arm/omap tiotg_rescan(): properly pass the...



details:   https://anonhg.NetBSD.org/src/rev/bf5f6fa7c81e
branches:  thorpej-cfargs
changeset: 1019721:bf5f6fa7c81e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Mar 26 02:02:53 2021 +0000

description:
tiotg_rescan(): properly pass the "matching locators" to config_found(),
and use config_stdsubmatch().

diffstat:

 sys/arch/arm/omap/tiotg.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 631ca894feab -r bf5f6fa7c81e sys/arch/arm/omap/tiotg.c
--- a/sys/arch/arm/omap/tiotg.c Thu Mar 25 15:59:49 2021 +0000
+++ b/sys/arch/arm/omap/tiotg.c Fri Mar 26 02:02:53 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tiotg.c,v 1.7.18.2 2021/03/24 14:21:08 thorpej Exp $ */
+/* $NetBSD: tiotg.c,v 1.7.18.3 2021/03/26 02:02:53 thorpej Exp $ */
 /*
  * Copyright (c) 2013 Manuel Bouyer.  All rights reserved.
  *
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.7.18.2 2021/03/24 14:21:08 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.7.18.3 2021/03/26 02:02:53 thorpej Exp $");
 
 #include "opt_omap.h"
 #include "locators.h"
@@ -191,11 +191,15 @@
 {
        struct tiotg_softc *sc = device_private(self);
        struct motg_attach_args aa;
+       int mlocs[TIOTG_PORTCF_NLOCS];
        int i;
 
        for (i = 0; i < TI_OTG_NPORTS; i++) {
                if (sc->sc_motgdev[i] != NULL)
                        continue;
+
+               mlocs[TIOTG_PORTCF_PORT] = i;
+
                if (bus_space_subregion(sc->sc_iot, sc->sc_ioh,
                    USB_CTRL_OFFSET(i), USB_PORT_SIZE, &aa.aa_ioh) < 0) {
                        aprint_error_dev(self,
@@ -207,7 +211,10 @@
                aa.aa_port = i;
                aa.aa_intr = sc->sc_intrbase + 1 + i;
                sc->sc_motgdev[i] =
-                   config_found(self, &aa, ti_motg_print, CFARG_EOL);
+                   config_found(self, &aa, ti_motg_print,
+                                CFARG_SUBMATCH, config_stdsubmatch,
+                                CFARG_LOCATORS, mlocs,
+                                CFARG_EOL);
        }
        return 0;
 }



Home | Main Index | Thread Index | Old Index