IOMUX: Fix stopping unused dropped consoles
iomux_match_device() returns -ENOENT instead of the end index, which means
console_stop() is never called at the moment for unused consoles.
This prevents e.g. f_acm from releasing the USB gadget interface when
removing it from stdio/stderr/stdin.
Fixes: b672c1619b ("IOMUX: Split out iomux_match_device() helper")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
committed by
Tom Rini
parent
8c98b57d72
commit
265420ebc1
@@ -131,7 +131,7 @@ int iomux_doenv(const int console, const char *arg)
|
||||
/* Stop dropped consoles */
|
||||
for (i = 0; i < repeat; i++) {
|
||||
j = iomux_match_device(cons_set, cs_idx, old_set[i]);
|
||||
if (j == cs_idx)
|
||||
if (j == -ENOENT)
|
||||
console_stop(console, old_set[i]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user