[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V11 09/27] pc: remove a global variable, floppy_cont
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH V11 09/27] pc: remove a global variable, floppy_controller. |
Date: |
Tue, 5 Jan 2010 15:27:32 +0900 |
Remove a global variable, floppy_controller.
Since it is unnecessarily global, make it local and pass it as
a function argument.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/pc.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index 0dee9d7..f5eb026 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -64,7 +64,6 @@
#define MAX_IDE_BUS 2
-static fdctrl_t *floppy_controller;
static RTCState *rtc_state;
typedef struct isa_irq_state {
@@ -256,7 +255,8 @@ static int pc_boot_set(void *opaque, const char
*boot_device)
/* hd_table must contain 4 block drivers */
static void cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
- const char *boot_device, DriveInfo **hd_table)
+ const char *boot_device, DriveInfo **hd_table,
+ fdctrl_t *floppy_controller)
{
RTCState *s = rtc_state;
int nbds, bds[3] = { 0, };
@@ -1016,6 +1016,7 @@ static void pc_init1(ram_addr_t ram_size,
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
DriveInfo *fd[MAX_FD];
void *fw_cfg;
+ fdctrl_t *floppy_controller;
PITState *pit;
if (ram_size >= 0xe0000000 ) {
@@ -1226,7 +1227,8 @@ static void pc_init1(ram_addr_t ram_size,
}
floppy_controller = fdctrl_init_isa(fd);
- cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device, hd);
+ cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device, hd,
+ floppy_controller);
if (pci_enabled && usb_enabled) {
usb_uhci_piix3_init(pci_bus, piix3_devfn + 2);
--
1.6.5.4
- [Qemu-devel] [PATCH V11 14/27] pc: split out memory allocation from pc_init1() into pc_memory_init(), (continued)
- [Qemu-devel] [PATCH V11 14/27] pc: split out memory allocation from pc_init1() into pc_memory_init(), Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 03/27] acpi: add acpi constants from linux header files and use them., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 02/27] acpi: split out apm register emulation from acpi.c, Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 06/27] pc: initialize ioapic before use., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 01/27] acpi: split out pc smbus routines from acpi.c into pc_smbus.c, Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 22/27] pci hotplug: add argument to pci hot plug callback., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 27/27] mc146818rtc: remove #ifdef DEBUG_CMOS., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 09/27] pc: remove a global variable, floppy_controller.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH V11 11/27] pc: introduce a function to allocate cpu irq., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 26/27] pc_apm: remove #ifdef DEBUG., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 19/27] pc: move rtc declarations from pc.h into a dedicated header file., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 25/27] acpi_piix4: remove #ifdef DEBUG., Isaku Yamahata, 2010/01/05