[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/15] device_tree: Replace current_machine by qdev_get_machine()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 09/15] device_tree: Replace current_machine by qdev_get_machine() |
Date: |
Thu, 9 Jan 2020 16:21:27 +0100 |
As we want to remove the global current_machine,
replace 'current_machine' by MACHINE(qdev_get_machine()).
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
device_tree.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/device_tree.c b/device_tree.c
index f8b46b3c73..665ea2f586 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -466,7 +466,9 @@ uint32_t qemu_fdt_alloc_phandle(void *fdt)
* which phandle id to start allocating phandles.
*/
if (!phandle) {
- phandle = machine_phandle_start(current_machine);
+ MachineState *ms = MACHINE(qdev_get_machine());
+
+ phandle = machine_phandle_start(ms);
}
if (!phandle) {
--
2.21.1
- [PATCH 05/15] device-hotplug: Replace current_machine by qdev_get_machine(), (continued)
- [PATCH 05/15] device-hotplug: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 06/15] migration/savevm: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 07/15] hw/core/machine-qmp-cmds: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 08/15] target/arm/monitor: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 09/15] device_tree: Replace current_machine by qdev_get_machine(),
Philippe Mathieu-Daudé <=
- [PATCH 10/15] memory: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 11/15] exec: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 12/15] accel: Introduce the current_accel() method, Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 13/15] accel: Replace current_machine->accelerator by current_accel() method, Philippe Mathieu-Daudé, 2020/01/09