Exposing the IRQ number as a QOM property not only allows it to be
configurable but also to be printed by standard QOM mechanisms. This allows
isabus_dev_print() to be retired eventually.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/rtc/m48t59-isa.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
@@ -97,9 +99,14 @@ static void m48t59_isa_realize(DeviceState *dev, Error
**errp)
M48txxISAState *d = M48TXX_ISA(dev);
M48t59State *s = &d->state;
+ if (d->isairq >= ISA_NUM_IRQS) {
+ error_setg(errp, "Maximum value for \"irq\" is: %d", ISA_NUM_IRQS - 1);