@@ -261,7 +261,7 @@ static void microvm_devices_init(MicrovmMachineState *mms)
if (kvm_pit_in_kernel()) {
kvm_pit_init(isa_bus, 0x40);
} else {
- i8254_pit_init(isa_bus, 0x40, 0, NULL);
+ i8254_pit_create(isa_bus, 0x40, isa_bus_get_irq(isa_bus, 0));
}
}
@@ -99,7 +99,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
isa_bus_irqs(isabus, s->i8259);
/* 1 82C54 (pit) */
- pit = i8254_pit_init(isabus, 0x40, 0, NULL);
+ pit = i8254_pit_create(isabus, 0x40, isa_bus_get_irq(isabus, 0));
/* speaker */
pcspk_init(isa_new(TYPE_PC_SPEAKER), isabus, pit);
@@ -214,8 +214,8 @@ static void piix4_realize(PCIDevice *dev, Error **errp)
/* initialize ISA irqs */
isa_bus_irqs(isa_bus, s->isa);
- /* initialize pit */
- i8254_pit_init(isa_bus, 0x40, 0, NULL);
+ /* PIT */
+ i8254_pit_create(isa_bus, 0x40, isa_bus_get_irq(isa_bus, 0));
/* DMA */
i8257_dma_init(isa_bus, 0);
@@ -624,7 +624,7 @@ static void via_isa_realize(PCIDevice *d, Error **errp)
s->isa_irqs = i8259_init(isa_bus, *isa_irq);
isa_bus_irqs(isa_bus, s->isa_irqs);
- i8254_pit_init(isa_bus, 0x40, 0, NULL);
+ i8254_pit_create(isa_bus, 0x40, isa_bus_get_irq(isa_bus, 0));
i8257_dma_init(isa_bus, 0);
/* RTC */
@@ -251,7 +251,7 @@ static void mips_jazz_init(MachineState *machine,
i8259 = i8259_init(isa_bus, env->irq[4]);
isa_bus_irqs(isa_bus, i8259);
i8257_dma_init(isa_bus, 0);
- pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
+ pit = i8254_pit_create(isa_bus, 0x40, isa_bus_get_irq(isa_bus, 0));
pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit);
/* Video card */
@@ -56,13 +56,6 @@ OBJECT_DECLARE_TYPE(PITCommonState, PITCommonClass, PIT_COMMON)
*/
ISADevice *i8254_pit_create(ISABus *bus, int iobase, qemu_irq irq_in);
-static inline ISADevice *i8254_pit_init(ISABus *bus, int base, int isa_irq,
- qemu_irq alt_irq)
-{
- assert(isa_irq == 0 && alt_irq == NULL);
- return i8254_pit_create(bus, base, isa_bus_get_irq(bus, 0));
-}
-
static inline ISADevice *kvm_pit_init(ISABus *bus, int base)
{
DeviceState *dev;
In-line the one-line i8254_pit_create() call. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/i386/microvm.c | 2 +- hw/isa/i82378.c | 2 +- hw/isa/piix4.c | 4 ++-- hw/isa/vt82c686.c | 2 +- hw/mips/jazz.c | 2 +- include/hw/timer/i8254.h | 7 ------- 6 files changed, 6 insertions(+), 13 deletions(-)