[PATCH 4/5] hw/timer/i8254: Really inline i8254_pit_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In-line the one-line i8254_pit_create() call.

Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
---
 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(-)

diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 29f30dd6d3..9204bb4ff2 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -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));
         }
     }
 
diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
index e3322e03bf..f75f5a23ba 100644
--- a/hw/isa/i82378.c
+++ b/hw/isa/i82378.c
@@ -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);
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 94e5dc7825..8ff118445f 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -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);
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 3f9bd0c04d..297bcda420 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -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 */
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index 6aefe9a61b..856acfe2a7 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -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 */
diff --git a/include/hw/timer/i8254.h b/include/hw/timer/i8254.h
index 0d837f3f41..aa48c44d39 100644
--- a/include/hw/timer/i8254.h
+++ b/include/hw/timer/i8254.h
@@ -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;
-- 
2.38.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux