[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 22/42] hw/mips/malta: Reuse dev variable
From: |
Bernhard Beschow |
Subject: |
[PATCH 22/42] hw/mips/malta: Reuse dev variable |
Date: |
Thu, 1 Sep 2022 18:25:53 +0200 |
While at it, move the assignments closer to where they are used.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/mips/malta.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 0e932988e0..0ec2ac2eaf 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1239,7 +1239,6 @@ void mips_malta_init(MachineState *machine)
MaltaState *s;
PCIDevice *piix4;
DeviceState *dev;
- DeviceState *pm_dev;
s = MIPS_MALTA(qdev_new(TYPE_MIPS_MALTA));
sysbus_realize_and_unref(SYS_BUS_DEVICE(s), &error_fatal);
@@ -1405,13 +1404,13 @@ void mips_malta_init(MachineState *machine)
TYPE_PIIX4_PCI_DEVICE);
dev = DEVICE(piix4);
isa_bus = ISA_BUS(qdev_get_child_bus(dev, "isa.0"));
- pm_dev = DEVICE(object_resolve_path_component(OBJECT(dev), "pm"));
- smbus = I2C_BUS(qdev_get_child_bus(pm_dev, "i2c"));
/* Interrupt controller */
qdev_connect_gpio_out_named(dev, "intr", 0, i8259_irq);
/* generate SPD EEPROM data */
+ dev = DEVICE(object_resolve_path_component(OBJECT(piix4), "pm"));
+ smbus = I2C_BUS(qdev_get_child_bus(dev, "i2c"));
generate_eeprom_spd(&smbus_eeprom_buf[0 * 256], ram_size);
generate_eeprom_serial(&smbus_eeprom_buf[6 * 256]);
smbus_eeprom_init(smbus, 8, smbus_eeprom_buf, smbus_eeprom_size);
--
2.37.3
- [PATCH 13/42] hw/isa/piix3: Add size constraints to rcr_ops, (continued)
- [PATCH 13/42] hw/isa/piix3: Add size constraints to rcr_ops, Bernhard Beschow, 2022/09/01
- [PATCH 16/42] hw/isa/piix3: Allow board to provide PCI interrupt routes, Bernhard Beschow, 2022/09/01
- [PATCH 15/42] hw/isa/piix3: Prefer pci_address_space() over get_system_memory(), Bernhard Beschow, 2022/09/01
- [PATCH 17/42] hw/isa/piix3: Resolve redundant PIIX_NUM_PIC_IRQS, Bernhard Beschow, 2022/09/01
- [PATCH 20/42] hw/isa/piix3: Prefix pci_slot_get_pirq() with "piix3_", Bernhard Beschow, 2022/09/01
- [PATCH 18/42] hw/isa/piix3: Rename pci_piix3_props for sharing with PIIX4, Bernhard Beschow, 2022/09/01
- [PATCH 23/42] meson: Fix dependencies of piix4 southbridge, Bernhard Beschow, 2022/09/01
- [PATCH 19/42] hw/isa/piix3: Rename piix3_reset() for sharing with PIIX4, Bernhard Beschow, 2022/09/01
- [PATCH 22/42] hw/mips/malta: Reuse dev variable,
Bernhard Beschow <=
- [PATCH 32/42] hw/isa/piix4: Rename wrongly named method, Bernhard Beschow, 2022/09/01
- [PATCH 31/42] hw/isa/piix4: Rename reset control operations to match PIIX3, Bernhard Beschow, 2022/09/01
- [PATCH 24/42] hw/isa/piix4: Add missing initialization, Bernhard Beschow, 2022/09/01
- [PATCH 28/42] hw/isa/piix4: Remove unused code, Bernhard Beschow, 2022/09/01
- [PATCH 21/42] hw/isa/piix3: Rename typedef PIIX3State to PIIXState, Bernhard Beschow, 2022/09/01
- [PATCH 41/42] hw/isa/piix: Drop the "3" from the PIIX base class, Bernhard Beschow, 2022/09/01
- [PATCH 30/42] hw/isa/piix4: Reuse struct PIIXState from PIIX3, Bernhard Beschow, 2022/09/01
- [PATCH 27/42] hw/isa/piix4: Allow board to provide PCI interrupt routes, Bernhard Beschow, 2022/09/01