mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
serial: Factor out common serial_hds_isa_init()
It's the same old loop copied five times, plus another instance where it's clipped to two iterations and unrolled. No external users of serial_isa_init() are left, so give it internal linkage. Maintainers of affected machines cc'ed. Cc: Richard Henderson <rth@twiddle.net> Cc: Anthony Liguori <aliguori@amazon.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Leon Alrae <leon.alrae@imgtec.com> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
aef0d55a4b
commit
b6607a1a20
8 changed files with 22 additions and 30 deletions
|
@ -849,11 +849,8 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
|
|||
NULL, 115200, serial_hds[i], DEVICE_BIG_ENDIAN);
|
||||
i++;
|
||||
}
|
||||
for(; i < MAX_SERIAL_PORTS; i++) {
|
||||
if (serial_hds[i]) {
|
||||
serial_isa_init(isa_bus, i, serial_hds[i]);
|
||||
}
|
||||
}
|
||||
|
||||
serial_hds_isa_init(isa_bus, MAX_SERIAL_PORTS);
|
||||
|
||||
for(i = 0; i < MAX_PARALLEL_PORTS; i++) {
|
||||
if (parallel_hds[i]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue