]> Git Repo - qemu.git/commitdiff
vmport: Disentangle read handler type from portio
authorJan Kiszka <[email protected]>
Sat, 22 Jun 2013 06:07:06 +0000 (08:07 +0200)
committerPaolo Bonzini <[email protected]>
Thu, 4 Jul 2013 15:42:44 +0000 (17:42 +0200)
In case the latter may vanish one day, make sure the vmport read handler
type will remain unaffected. This is also conceptually cleaner.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
hw/misc/vmport.c
include/hw/i386/pc.h

index 8363dfdf9297ac619468ad89216ef67bd4257d5b..86390728f59c14cbb4bbf3f6f6d70271cef7d6e2 100644 (file)
@@ -43,13 +43,13 @@ typedef struct VMPortState
     ISADevice parent_obj;
 
     MemoryRegion io;
-    IOPortReadFunc *func[VMPORT_ENTRIES];
+    VMPortReadFunc *func[VMPORT_ENTRIES];
     void *opaque[VMPORT_ENTRIES];
 } VMPortState;
 
 static VMPortState *port_state;
 
-void vmport_register(unsigned char command, IOPortReadFunc *func, void *opaque)
+void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque)
 {
     if (command >= VMPORT_ENTRIES)
         return;
index a417402bbbb329e2d95aa65870c255ac2510a544..a350d8fa513fa9ac2bd3c4fa1be21fcd20e7b360 100644 (file)
@@ -3,7 +3,6 @@
 
 #include "qemu-common.h"
 #include "exec/memory.h"
-#include "exec/ioport.h"
 #include "hw/isa/isa.h"
 #include "hw/block/fdc.h"
 #include "net/net.h"
@@ -56,11 +55,14 @@ typedef struct GSIState {
 void gsi_handler(void *opaque, int n, int level);
 
 /* vmport.c */
+typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address);
+
 static inline void vmport_init(ISABus *bus)
 {
     isa_create_simple(bus, "vmport");
 }
-void vmport_register(unsigned char command, IOPortReadFunc *func, void *opaque);
+
+void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque);
 void vmmouse_get_data(uint32_t *data);
 void vmmouse_set_data(const uint32_t *data);
 
This page took 0.024508 seconds and 4 git commands to generate.