diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2018-04-20 15:52:49 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2018-04-26 13:58:29 +0100 |
| commit | b8846a4d6352b2a1d2012f8b3b9115640524aeda (patch) | |
| tree | d9cdc0080393509f1b1ba693504ede9ad7cf5536 /hw/ppc/spapr.c | |
| parent | 6af2692e86f9fdfb3d3d291c2708e81c3125d8e5 (diff) | |
| download | focaccia-qemu-b8846a4d6352b2a1d2012f8b3b9115640524aeda.tar.gz focaccia-qemu-b8846a4d6352b2a1d2012f8b3b9115640524aeda.zip | |
vl.c: new function serial_max_hds()
Create a new function serial_max_hds() which returns the number of serial ports defined by the user. This is needed only by spapr. This allows us to remove the MAX_SERIAL_PORTS define. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180420145249.32435-14-peter.maydell@linaro.org
Diffstat (limited to 'hw/ppc/spapr.c')
| -rw-r--r-- | hw/ppc/spapr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index b0ecfaca9e..92194a9a53 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2589,7 +2589,7 @@ static void spapr_machine_init(MachineState *machine) /* Set up VIO bus */ spapr->vio_bus = spapr_vio_bus_init(); - for (i = 0; i < MAX_SERIAL_PORTS; i++) { + for (i = 0; i < serial_max_hds(); i++) { if (serial_hd(i)) { spapr_vty_create(spapr->vio_bus, serial_hd(i)); } |