aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-05-14 16:29:14 +0900
committerBlue Swirl <blauwirbel@gmail.com>2010-05-15 15:52:05 +0000
commite3a5cf425032e03930a650788332e3d0ff8fc9c7 (patch)
tree9e601e9c031a6caa0f23a96fdd93b86f19f3e8f2 /hw
parentffe513da92c3ebbe47c6eab761146db4fcaf7883 (diff)
pc: split out pci device init from pc_init1() into pc_pci_device_init()
Split out pci device initialization from pc_init1() into pc_pci_device_init(). and removed unnecessary braces. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pc.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/hw/pc.c b/hw/pc.c
index d820a516a0..5c8a11b71f 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -997,6 +997,17 @@ static void pc_basic_device_init(qemu_irq *isa_irq,
*floppy_controller = fdctrl_init_isa(fd);
}
+static void pc_pci_device_init(PCIBus *pci_bus)
+{
+ int max_bus;
+ int bus;
+
+ max_bus = drive_get_max_bus(IF_SCSI);
+ for (bus = 0; bus <= max_bus; bus++) {
+ pci_create_simple(pci_bus, -1, "lsi53c895a");
+ }
+}
+
/* PC hardware initialisation */
static void pc_init1(ram_addr_t ram_size,
const char *boot_device,
@@ -1116,13 +1127,7 @@ static void pc_init1(ram_addr_t ram_size,
}
if (pci_enabled) {
- int max_bus;
- int bus;
-
- max_bus = drive_get_max_bus(IF_SCSI);
- for (bus = 0; bus <= max_bus; bus++) {
- pci_create_simple(pci_bus, -1, "lsi53c895a");
- }
+ pc_pci_device_init(pci_bus);
}
}