[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/11] hw/i386/pc: No need for rtc_state to be an out-parameter
From: |
Bernhard Beschow |
Subject: |
[PATCH 06/11] hw/i386/pc: No need for rtc_state to be an out-parameter |
Date: |
Wed, 13 Jul 2022 10:17:30 +0200 |
Now that the RTC is created as part of the southbridges it doesn't need
to be an out-parameter any longer.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/i386/pc.c | 8 ++++----
hw/i386/pc_piix.c | 2 +-
hw/i386/pc_q35.c | 2 +-
include/hw/i386/pc.h | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index eba1c98b5a..886c6b451a 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1128,7 +1128,7 @@ static void pc_superio_init(ISABus *isa_bus, bool
create_fdctrl,
void pc_basic_device_init(struct PCMachineState *pcms,
ISABus *isa_bus, qemu_irq *gsi,
- ISADevice **rtc_state,
+ ISADevice *rtc_state,
bool create_fdctrl,
uint32_t hpet_irqs)
{
@@ -1183,12 +1183,12 @@ void pc_basic_device_init(struct PCMachineState *pcms,
}
if (rtc_irq) {
- qdev_connect_gpio_out(DEVICE(*rtc_state), 0, rtc_irq);
+ qdev_connect_gpio_out(DEVICE(rtc_state), 0, rtc_irq);
} else {
- uint32_t irq = object_property_get_uint(OBJECT(*rtc_state),
+ uint32_t irq = object_property_get_uint(OBJECT(rtc_state),
"irq",
&error_fatal);
- isa_connect_gpio_out(*rtc_state, 0, irq);
+ isa_connect_gpio_out(rtc_state, 0, irq);
}
qemu_register_boot_set(pc_boot_set, rtc_state);
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 52c550f8b8..0f6cdc5bc4 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -263,7 +263,7 @@ static void pc_init1(MachineState *machine,
}
/* init basic PC hardware */
- pc_basic_device_init(pcms, isa_bus, x86ms->gsi, &rtc_state, true,
+ pc_basic_device_init(pcms, isa_bus, x86ms->gsi, rtc_state, true,
0x4);
pc_nic_init(pcmc, isa_bus, pci_bus);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index d850313180..15b8b814c3 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -284,7 +284,7 @@ static void pc_q35_init(MachineState *machine)
}
/* init basic PC hardware */
- pc_basic_device_init(pcms, isa_bus, x86ms->gsi, &rtc_state, !mc->no_floppy,
+ pc_basic_device_init(pcms, isa_bus, x86ms->gsi, rtc_state, !mc->no_floppy,
0xff0104);
/* connect pm stuff to lpc */
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index b7735dccfc..d1fd8969a0 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -164,7 +164,7 @@ uint64_t pc_pci_hole64_start(void);
DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus);
void pc_basic_device_init(struct PCMachineState *pcms,
ISABus *isa_bus, qemu_irq *gsi,
- ISADevice **rtc_state,
+ ISADevice *rtc_state,
bool create_fdctrl,
uint32_t hpet_irqs);
void pc_cmos_init(PCMachineState *pcms,
--
2.37.1
- [PATCH 00/11] QOM'ify PIIX3 southbridge, Bernhard Beschow, 2022/07/13
- [PATCH 01/11] hw/i386/pc: QOM'ify DMA creation, Bernhard Beschow, 2022/07/13
- [PATCH 04/11] hw/isa/piix3: QOM'ify ACPI controller creation, Bernhard Beschow, 2022/07/13
- [PATCH 06/11] hw/i386/pc: No need for rtc_state to be an out-parameter,
Bernhard Beschow <=
- [PATCH 09/11] hw/isa/piix3: QOM'ify IDE controller creation, Bernhard Beschow, 2022/07/13
- [PATCH 05/11] hw/i386/pc: QOM'ify RTC creation, Bernhard Beschow, 2022/07/13
- [PATCH 08/11] hw/isa/piix3: QOM'ify ISA PIC creation, Bernhard Beschow, 2022/07/13
- [PATCH 07/11] hw/intc/i8259: Introduce i8259 proxy "isa-pic", Bernhard Beschow, 2022/07/13
- [PATCH 11/11] hw/isa/piix3: Remove extra ';' outside of functions, Bernhard Beschow, 2022/07/13
- [PATCH 02/11] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 southbridge, Bernhard Beschow, 2022/07/13
- [PATCH 03/11] hw/isa/piix3: QOM'ify USB controller creation, Bernhard Beschow, 2022/07/13