Patchwork i440fx: clean up

login
register
mail settings
Submitter Paolo Bonzini
Date Dec. 16, 2011, 2:02 p.m.
Message ID <1324044124-4786-1-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/131826/
State New
Headers show

Comments

Paolo Bonzini - Dec. 16, 2011, 2:02 p.m.
Add the piix3 child also in the Xen case.  Drop the unused piix3
field from PCII440FXState.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/piix_pci.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

Patch

diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index d785d4b..8d106a8 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -82,7 +82,6 @@  struct PCII440FXState {
     MemoryRegion smram_region;
     uint8_t smm_enabled;
     bool smram_enabled;
-    PIIX3State *piix3;
 };
 
 
@@ -324,12 +323,11 @@  static PCIBus *i440fx_common_init(const char *device_name,
                 pci_create_simple_multifunction(b, -1, true, "PIIX3"));
         pci_bus_irqs(b, piix3_set_irq, pci_slot_get_pirq, piix3,
                 PIIX_NUM_PIRQS);
-
-        qdev_property_add_child(dev, "piix3", &piix3->dev.qdev, NULL);
     }
-    piix3->pic = pic;
 
-    (*pi440fx_state)->piix3 = piix3;
+    qdev_property_add_child(dev, "piix3", &piix3->dev.qdev, NULL);
+
+    piix3->pic = pic;
 
     *piix3_devfn = piix3->dev.devfn;