diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-02-11 17:09:42 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-02-16 11:16:08 -0500 |
commit | 400797cad36850797307be3c56d2d5bc16aa02bb (patch) | |
tree | 145e8fcdee8bdf50ca07849cffd41b80a3bcaeaa /common/iomux.c | |
parent | b672c1619bb9615aff3ebbe15c20083fd0f58f9b (diff) | |
download | u-boot-400797cad36850797307be3c56d2d5bc16aa02bb.tar.gz u-boot-400797cad36850797307be3c56d2d5bc16aa02bb.tar.bz2 u-boot-400797cad36850797307be3c56d2d5bc16aa02bb.zip |
IOMUX: Split out for_each_console_dev() helper macro
It is not only less lines of code, but also better readability
when new macro is being in use. Introduce for_each_console_dev()
helper macro and convert current users to it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'common/iomux.c')
-rw-r--r-- | common/iomux.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/common/iomux.c b/common/iomux.c index a8be1ac7d8..5290b13b66 100644 --- a/common/iomux.c +++ b/common/iomux.c @@ -15,10 +15,8 @@ void iomux_printdevs(const int console) int i; struct stdio_dev *dev; - for (i = 0; i < cd_count[console]; i++) { - dev = console_devices[console][i]; + for_each_console_dev(i, console, dev) printf("%s ", dev->name); - } printf("\n"); } |