diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2013-07-24 18:56:13 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-10-14 17:48:52 +0300 |
commit | 64e9df8d34e493e59c1920358257a7576a560a1a (patch) | |
tree | d39c6be4e2a3ccfe29a186c68e50cc18f224314a /hw/timer/hpet.c | |
parent | 309cd62d6b2628b4f0e2850b42011077f40956c7 (diff) |
hpet: add API to find it
Add API to find HPET using QOM.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/timer/hpet.c')
-rw-r--r-- | hw/timer/hpet.c | 5 |
1 files changed, 5 insertions, 0 deletions
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, |