From 64e9df8d34e493e59c1920358257a7576a560a1a Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 24 Jul 2013 18:56:13 +0300 Subject: hpet: add API to find it Add API to find HPET using QOM. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- hw/timer/hpet.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw/timer') diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index fcd22aea59..2eb75ea945 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -757,6 +757,11 @@ 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, -- cgit v1.2.1