[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 03/26] hw/ppc/e500: Prefer QOM cast
From: |
Bernhard Beschow |
Subject: |
[PATCH v4 03/26] hw/ppc/e500: Prefer QOM cast |
Date: |
Sun, 3 Nov 2024 14:33:49 +0100 |
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/ppc/e500.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 0683629ac0..964a22c5b7 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -1008,7 +1008,7 @@ void ppce500_init(MachineState *machine)
sysbus_connect_irq(s, 0, qdev_get_gpio_in(mpicdev, MPC8544_I2C_IRQ));
memory_region_add_subregion(ccsr_addr_space, MPC8544_I2C_REGS_OFFSET,
sysbus_mmio_get_region(s, 0));
- i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c");
+ i2c = I2C_BUS(qdev_get_child_bus(dev, "i2c"));
i2c_slave_create_simple(i2c, "ds1338", RTC_REGS_OFFSET);
/* eSDHC */
@@ -1057,7 +1057,7 @@ void ppce500_init(MachineState *machine)
memory_region_add_subregion(ccsr_addr_space, MPC8544_PCI_REGS_OFFSET,
sysbus_mmio_get_region(s, 0));
- pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
+ pci_bus = PCI_BUS(qdev_get_child_bus(dev, "pci.0"));
if (!pci_bus)
printf("couldn't create PCI controller!\n");
--
2.47.0
- [PATCH v4 00/26] E500 Cleanup, Bernhard Beschow, 2024/11/03
- [PATCH v4 01/26] hw/ppc/e500: Do not leak struct boot_info, Bernhard Beschow, 2024/11/03
- [PATCH v4 03/26] hw/ppc/e500: Prefer QOM cast,
Bernhard Beschow <=
- [PATCH v4 02/26] hw/ppc/e500: Remove firstenv variable, Bernhard Beschow, 2024/11/03
- [PATCH v4 04/26] hw/ppc/e500: Remove unused "irqs" parameter, Bernhard Beschow, 2024/11/03
- [PATCH v4 05/26] hw/ppc/e500: Add missing device tree properties to i2c controller node, Bernhard Beschow, 2024/11/03
- [PATCH v4 06/26] hw/ppc/e500: Reuse TYPE_GPIO_PWR, Bernhard Beschow, 2024/11/03
- [PATCH v4 07/26] hw/ppc/e500: Use SysBusDevice API to access TYPE_CCSR's internal resources, Bernhard Beschow, 2024/11/03
- [PATCH v4 12/26] hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/03
- [PATCH v4 08/26] hw/ppc/e500: Extract ppce500_ccsr.c, Bernhard Beschow, 2024/11/03
- [PATCH v4 09/26] hw/ppc/ppce500_ccsr: Trace access to CCSR region, Bernhard Beschow, 2024/11/03
- [PATCH v4 10/26] hw/ppc/mpc8544_guts: Populate POR PLL ratio status register, Bernhard Beschow, 2024/11/03