[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-5.1? 3/4] hw/qdev-clock: Uninline qdev_connect_clock_in()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-5.1? 3/4] hw/qdev-clock: Uninline qdev_connect_clock_in() |
Date: |
Mon, 3 Aug 2020 12:56:46 +0200 |
We want to assert the device is not realized. To avoid overloading
this header including "hw/qdev-core.h", uninline the function first.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/qdev-clock.h | 6 +-----
hw/core/qdev-clock.c | 5 +++++
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/hw/qdev-clock.h b/include/hw/qdev-clock.h
index a340f65ff9..a897f7c9d0 100644
--- a/include/hw/qdev-clock.h
+++ b/include/hw/qdev-clock.h
@@ -71,11 +71,7 @@ Clock *qdev_get_clock_out(DeviceState *dev, const char
*name);
* Set the source clock of input clock @name of device @dev to @source.
* @source period update will be propagated to @name clock.
*/
-static inline void qdev_connect_clock_in(DeviceState *dev, const char *name,
- Clock *source)
-{
- clock_set_source(qdev_get_clock_in(dev, name), source);
-}
+void qdev_connect_clock_in(DeviceState *dev, const char *name, Clock *source);
/**
* qdev_alias_clock:
diff --git a/hw/core/qdev-clock.c b/hw/core/qdev-clock.c
index 5cc1e82e51..f139b68b88 100644
--- a/hw/core/qdev-clock.c
+++ b/hw/core/qdev-clock.c
@@ -183,3 +183,8 @@ Clock *qdev_alias_clock(DeviceState *dev, const char *name,
return ncl->clock;
}
+
+void qdev_connect_clock_in(DeviceState *dev, const char *name, Clock *source)
+{
+ clock_set_source(qdev_get_clock_in(dev, name), source);
+}
--
2.21.3
- [PATCH-for-5.1? 0/4] hw/arm/xilinx_zynq: Call qdev_connect_clock_in() before DeviceRealize, Philippe Mathieu-Daudé, 2020/08/03
- [PATCH-for-5.1? 1/4] hw/arm/xilinx_zynq: Uninline cadence_uart_create(), Philippe Mathieu-Daudé, 2020/08/03
- [PATCH-for-5.1? 2/4] hw/arm/xilinx_zynq: Call qdev_connect_clock_in() before DeviceRealize, Philippe Mathieu-Daudé, 2020/08/03
- [PATCH-for-5.1? 3/4] hw/qdev-clock: Uninline qdev_connect_clock_in(),
Philippe Mathieu-Daudé <=
- [PATCH-for-5.1? 4/4] hw/qdev-clock: Avoid calling qdev_connect_clock_in after DeviceRealize, Philippe Mathieu-Daudé, 2020/08/03
- Re: [PATCH-for-5.1? 0/4] hw/arm/xilinx_zynq: Call qdev_connect_clock_in() before DeviceRealize, Philippe Mathieu-Daudé, 2020/08/22
- Re: [PATCH-for-5.1? 0/4] hw/arm/xilinx_zynq: Call qdev_connect_clock_in() before DeviceRealize, Peter Maydell, 2020/08/24