[PATCH v2 2/7] console: Keep ->start() and ->stop() balanced
Andy Shevchenko
andy.shevchenko at gmail.com
Thu Dec 17 10:48:22 CET 2020
On Thu, Dec 17, 2020 at 1:16 AM Andy Shevchenko
<andriy.shevchenko at linux.intel.com> wrote:
> There is no need to call ->start() for already started device. All the same,
an already
> there is no need to call ->stop() for devices still in use.
>
> For now enforce this only for CONSOLE_MUX case.
now, enforce
the CONSOLE_MUX
...
> +static bool console_needs_handle(int file, struct stdio_dev *dev)
> +{
> + int i;
> +
> + for (i = 0; i < cd_count[file]; i++)
> + if (console_devices[file][i] == dev)
> + return false;
Actually this is no-op. I realized it later on.
It misses the iteration over all files. And file argument to exclude
iteration over that specific file.
I will update this, but will also wait a couple of days for other
comments against the series.
> + return true;
> +}
--
With Best Regards,
Andy Shevchenko
More information about the U-Boot
mailing list