[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 8/9] fw_cfg: fw_cfg is a singleton
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 8/9] fw_cfg: fw_cfg is a singleton |
Date: |
Tue, 4 Jun 2013 11:08:05 +0300 |
Make sure we only have a single instance ever:
because if it isn't we can't find it so it's
useless anyway.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/nvram/fw_cfg.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index df3f089..3c255ce 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -496,10 +496,9 @@ FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t
data_port,
s = DO_UPCAST(FWCfgState, busdev.qdev, dev);
- if (!object_resolve_path(FW_CFG_PATH, NULL)) {
- object_property_add_child(qdev_get_machine(), FW_CFG_NAME, OBJECT(s),
- NULL);
- }
+ assert(!object_resolve_path(FW_CFG_PATH, NULL));
+
+ object_property_add_child(qdev_get_machine(), FW_CFG_NAME, OBJECT(s),
NULL);
qdev_init_nofail(dev);
--
MST
- [Qemu-devel] [PULL 0/9] pci: misc cleanups, Michael S. Tsirkin, 2013/06/04
- [Qemu-devel] [PULL 2/9] dec.c - move to pci-bridge, Michael S. Tsirkin, 2013/06/04
- [Qemu-devel] [PULL 1/9] q35: set fw_name, Michael S. Tsirkin, 2013/06/04
- [Qemu-devel] [PULL 3/9] firmware_abi: move to include/hw/nvram/, Michael S. Tsirkin, 2013/06/04
- [Qemu-devel] [PULL 4/9] apic: rename apic specific bitopts, Michael S. Tsirkin, 2013/06/04
- [Qemu-devel] [PULL 6/9] fw_cfg: move typedef to qemu/typedefs.h, Michael S. Tsirkin, 2013/06/04
- [Qemu-devel] [PULL 5/9] refer to FWCfgState explicitly, Michael S. Tsirkin, 2013/06/04
- [Qemu-devel] [PULL 7/9] fw_cfg: add API to find FW cfg object, Michael S. Tsirkin, 2013/06/04
- [Qemu-devel] [PULL 8/9] fw_cfg: fw_cfg is a singleton,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 9/9] pvpanic: use FWCfgState explicitly, Michael S. Tsirkin, 2013/06/04
- Re: [Qemu-devel] [PULL 0/9] pci: misc cleanups, Anthony Liguori, 2013/06/17