[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 33/51] hpet: fix build with CONFIG_HPET off
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 33/51] hpet: fix build with CONFIG_HPET off |
Date: |
Fri, 21 Feb 2014 02:17:09 -0600 |
From: "Michael S. Tsirkin" <address@hidden>
make hpet_find inline so we don't need
to build hpet.c to check if hpet is enabled.
Fixes link error with CONFIG_HPET off.
Cc: address@hidden
Signed-off-by: Michael S. Tsirkin <address@hidden>
(cherry picked from commit 142e0950cfaf023a81112dc3cdfa799d769886a4)
Signed-off-by: Michael Roth <address@hidden>
---
hw/timer/hpet.c | 6 ------
include/hw/timer/hpet.h | 10 +++++++++-
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index 2eb75ea..c6c2803 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -42,7 +42,6 @@
#define HPET_MSI_SUPPORT 0
-#define TYPE_HPET "hpet"
#define HPET(obj) OBJECT_CHECK(HPETState, (obj), TYPE_HPET)
struct HPETState;
@@ -757,11 +756,6 @@ static void hpet_device_class_init(ObjectClass *klass,
void *data)
dc->props = hpet_device_properties;
}
-bool hpet_find(void)
-{
- return object_resolve_path_type("", TYPE_HPET, NULL);
-}
-
static const TypeInfo hpet_device_info = {
.name = TYPE_HPET,
.parent = TYPE_SYS_BUS_DEVICE,
diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h
index ab44bd3..773953b 100644
--- a/include/hw/timer/hpet.h
+++ b/include/hw/timer/hpet.h
@@ -13,6 +13,8 @@
#ifndef QEMU_HPET_EMUL_H
#define QEMU_HPET_EMUL_H
+#include "qom/object.h"
+
#define HPET_BASE 0xfed00000
#define HPET_CLK_PERIOD 10000000ULL /* 10000000 femtoseconds == 10ns*/
@@ -72,5 +74,11 @@ struct hpet_fw_config
extern struct hpet_fw_config hpet_cfg;
-bool hpet_find(void);
+#define TYPE_HPET "hpet"
+
+static inline bool hpet_find(void)
+{
+ return object_resolve_path_type("", TYPE_HPET, NULL);
+}
+
#endif
--
1.7.9.5
- [Qemu-stable] [PATCH 26/51] pc: map PCI address space as catchall region for not mapped addresses, (continued)
- [Qemu-stable] [PATCH 26/51] pc: map PCI address space as catchall region for not mapped addresses, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 27/51] piix: fix 32bit pci hole, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 29/51] linux-user: pass correct parameter to do_shmctl(), Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 25/51] exec: separate sections and nodes per address space, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 32/51] tcg/optimize: fix known-zero bits for right shift ops, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 31/51] Fix QEMU build on OpenBSD on x86 archs, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 34/51] block/iscsi: use a bh to schedule co reentrance, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 33/51] hpet: fix build with CONFIG_HPET off,
Michael Roth <=
- [Qemu-stable] [PATCH 35/51] qemu_opts_parse(): always check return value, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 38/51] mainstone: Fix duplicate array values for key 'space', Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 36/51] s390x/kvm: Fix diagnose handling., Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 37/51] seccomp: exit if seccomp_init() fails, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 39/51] migration: qmp_migrate(): keep working after syntax error, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 40/51] vfio-pci: Release all MSI-X vectors when disabled, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 41/51] block/curl: Implement the libcurl timer callback interface, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 43/51] scsi: Assign cancel_io vector for scsi_disk_emulate_ops, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 42/51] scsi: Support TEST UNIT READY in the dummy LUN0, Michael Roth, 2014/02/21
- [Qemu-stable] [PATCH 44/51] virtio-scsi: Cleanup of I/Os that never started, Michael Roth, 2014/02/21