Module Name: src
Committed By: thorpej
Date: Fri Mar 26 02:02:53 UTC 2021
Modified Files:
src/sys/arch/arm/omap [thorpej-cfargs]: tiotg.c
Log Message:
tiotg_rescan(): properly pass the "matching locators" to config_found(),
and use config_stdsubmatch().
To generate a diff of this commit:
cvs rdiff -u -r1.7.18.2 -r1.7.18.3 src/sys/arch/arm/omap/tiotg.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/arch/arm/omap/tiotg.c
diff -u src/sys/arch/arm/omap/tiotg.c:1.7.18.2 src/sys/arch/arm/omap/tiotg.c:1.7.18.3
--- src/sys/arch/arm/omap/tiotg.c:1.7.18.2 Wed Mar 24 14:21:08 2021
+++ src/sys/arch/arm/omap/tiotg.c Fri Mar 26 02:02:53 2021
@@ -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 @@ tiotg_rescan(device_t self, const char *
{
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 @@ tiotg_rescan(device_t self, const char *
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;
}