]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/blobdiff - include/hw/timer/hpet.h
hpet: fix build with CONFIG_HPET off
[lisovros/qemu_apohw.git] / include / hw / timer / hpet.h
index ab44bd31fd4c9d7567d4f358f5a3a12e6c7a2f8b..773953be75600a6de72fbb68a5914f2c6d70899f 100644 (file)
@@ -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