From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNpEL-00036P-81 for qemu-devel@nongnu.org; Sun, 22 Sep 2013 15:22:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VNpEC-0006Lf-Qq for qemu-devel@nongnu.org; Sun, 22 Sep 2013 15:22:05 -0400 Received: from mail-ee0-x234.google.com ([2a00:1450:4013:c00::234]:45838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNpEC-0006Js-Jc for qemu-devel@nongnu.org; Sun, 22 Sep 2013 15:21:56 -0400 Received: by mail-ee0-f52.google.com with SMTP id c41so1266935eek.25 for ; Sun, 22 Sep 2013 12:21:55 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <523F4361.9040606@redhat.com> Date: Sun, 22 Sep 2013 21:22:09 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1379857006-17451-1-git-send-email-mst@redhat.com> <1379857006-17451-23-git-send-email-mst@redhat.com> In-Reply-To: <1379857006-17451-23-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 22/23] hpet: add API to find it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, Anthony Liguori , afaerber@suse.de Il 22/09/2013 15:38, Michael S. Tsirkin ha scritto: > Add API to find HPET using QOM. > > Signed-off-by: Michael S. Tsirkin > --- > include/hw/timer/hpet.h | 2 ++ > hw/timer/hpet.c | 5 +++++ > 2 files changed, 7 insertions(+) > > diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h > index 757f79f..ab44bd3 100644 > --- a/include/hw/timer/hpet.h > +++ b/include/hw/timer/hpet.h > @@ -71,4 +71,6 @@ struct hpet_fw_config > } QEMU_PACKED; > > extern struct hpet_fw_config hpet_cfg; > + > +bool hpet_find(void); > #endif > diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c > index fcd22ae..676bd7d 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("", "hpet", NULL); s/"hpet"/TYPE_HPET/ Paolo > +} > + > static const TypeInfo hpet_device_info = { > .name = TYPE_HPET, > .parent = TYPE_SYS_BUS_DEVICE, >