Patchwork [1/4] vmware_vga: refactor device creation

login
register
mail settings
Submitter Blue Swirl
Date Feb. 2, 2011, 6:27 p.m.
Message ID <AANLkTikQ+5hGUR1UDooO0ew8owuRihJNw3v4NJ7HcbOr@mail.gmail.com>
Download mbox | patch
Permalink /patch/81522/
State New
Headers show

Comments

Blue Swirl - Feb. 2, 2011, 6:27 p.m.
Turn vmsvga_init into an inline function.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/vmware_vga.c |    5 -----
 hw/vmware_vga.h |    5 ++++-
 2 files changed, 4 insertions(+), 6 deletions(-)

Patch

diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index 6c59053..4656767 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -1309,11 +1309,6 @@  static int pci_vmsvga_initfn(PCIDevice *dev)
     return 0;
 }

-void pci_vmsvga_init(PCIBus *bus)
-{
-    pci_create_simple(bus, -1, "vmware-svga");
-}
-
 static PCIDeviceInfo vmsvga_info = {
     .qdev.name    = "vmware-svga",
     .qdev.size    = sizeof(struct pci_vmsvga_state_s),
diff --git a/hw/vmware_vga.h b/hw/vmware_vga.h
index 2e0813c..e7bcb22 100644
--- a/hw/vmware_vga.h
+++ b/hw/vmware_vga.h
@@ -4,6 +4,9 @@ 
 #include "qemu-common.h"

 /* vmware_vga.c */
-void pci_vmsvga_init(PCIBus *bus);
+static inline void pci_vmsvga_init(PCIBus *bus)
+{
+    pci_create_simple(bus, -1, "vmware-svga");
+}

 #endif