diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2013-12-11 02:47:16 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-12-11 20:11:10 +0200 |
commit | 142e0950cfaf023a81112dc3cdfa799d769886a4 (patch) | |
tree | 265febccce0b2739469247e5cbba89a364c34927 /include/hw | |
parent | 8ac2adf79a06372fe2c50ddac64cfffb93dbfeb8 (diff) |
hpet: fix build with CONFIG_HPET off
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: qemu-stable@nongnu.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/timer/hpet.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h index ab44bd31fd..773953be75 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 |