qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v10 12/21] i.MX: Move Qdev GPT construction helper a


From: Jean-Christophe Dubois
Subject: [Qemu-devel] [PATCH v10 12/21] i.MX: Move Qdev GPT construction helper as inline function.
Date: Mon, 6 Jul 2015 02:05:06 +0200

Signed-off-by: Jean-Christophe Dubois <address@hidden>
---

Changes since v1:
    * not present on v1

Changes since v2:
    * not present on v2

Changes since v3:
    * not present on v3

Changes since v4:
    * not present on v4

Changes since v5:
    * not present on v5

Changes since v6:
    * not present on v6

Changes since v7:
    * not present on v7

Changes since v8:
    * remove Qdev construction helper

Changes since v9:
    * Qdev construction helper is reintegrated and moved to a header file
      as an inline function.

 hw/timer/imx_gpt.c   | 11 -----------
 include/hw/arm/imx.h | 12 ++++++++++--
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/hw/timer/imx_gpt.c b/hw/timer/imx_gpt.c
index f61d4e5..218607b 100644
--- a/hw/timer/imx_gpt.c
+++ b/hw/timer/imx_gpt.c
@@ -12,7 +12,6 @@
  *
  */
 
-#include "hw/arm/imx.h"
 #include "hw/timer/imx_gpt.h"
 #include "hw/misc/imx_ccm.h"
 #include "qemu/main-loop.h"
@@ -449,16 +448,6 @@ static void imx_gpt_realize(DeviceState *dev, Error **errp)
     s->timer = ptimer_init(bh);
 }
 
-void imx_timerg_create(const hwaddr addr, qemu_irq irq, DeviceState *ccm)
-{
-    IMXGPTState *pp;
-    DeviceState *dev;
-
-    dev = sysbus_create_simple(TYPE_IMX_GPT, addr, irq);
-    pp = IMX_GPT(dev);
-    pp->ccm = ccm;
-}
-
 static void imx_gpt_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
diff --git a/include/hw/arm/imx.h b/include/hw/arm/imx.h
index c6cb192..b7aa4b6 100644
--- a/include/hw/arm/imx.h
+++ b/include/hw/arm/imx.h
@@ -16,6 +16,7 @@
 #include "hw/char/imx_serial.h"
 #include "hw/misc/imx_ccm.h"
 #include "hw/timer/imx_epit.h"
+#include "hw/timer/imx_gpt.h"
 
 /***
  * This Qdev construction helper is going to be removed soon
@@ -55,10 +56,17 @@ void imx_timerp_create(const hwaddr addr,
     pp->ccm = ccm;
 }
 
+static inline
 void imx_timerg_create(const hwaddr addr,
                        qemu_irq irq,
-                       DeviceState *ccm);
-
+                       DeviceState *ccm)
+{
+    IMXGPTState *pp;
+    DeviceState *dev;
 
+    dev = sysbus_create_simple(TYPE_IMX_GPT, addr, irq);
+    pp = IMX_GPT(dev);
+    pp->ccm = ccm;
+}
 
 #endif /* IMX_H */
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]