aboutsummaryrefslogtreecommitdiff
path: root/hw/char/serial-isa.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char/serial-isa.c')
-rw-r--r--hw/char/serial-isa.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c
index 1594ec4db3..54d3a12f51 100644
--- a/hw/char/serial-isa.c
+++ b/hw/char/serial-isa.c
@@ -133,13 +133,14 @@ static void serial_isa_init(ISABus *bus, int index, CharDriverState *chr)
qdev_init_nofail(dev);
}
-void serial_hds_isa_init(ISABus *bus, int n)
+void serial_hds_isa_init(ISABus *bus, int from, int to)
{
int i;
- assert(n <= MAX_SERIAL_PORTS);
+ assert(from >= 0);
+ assert(to <= MAX_SERIAL_PORTS);
- for (i = 0; i < n; ++i) {
+ for (i = from; i < to; ++i) {
if (serial_hds[i]) {
serial_isa_init(bus, i, serial_hds[i]);
}