cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
0a122b
From b166f0998eba97144034f39382e2e90339f4c5b1 Mon Sep 17 00:00:00 2001
0a122b
Message-Id: <b166f0998eba97144034f39382e2e90339f4c5b1.1387298827.git.minovotn@redhat.com>
0a122b
In-Reply-To: <3ed0fb61a3dc912ef036d7ef450bed192090709e.1387298827.git.minovotn@redhat.com>
0a122b
References: <3ed0fb61a3dc912ef036d7ef450bed192090709e.1387298827.git.minovotn@redhat.com>
0a122b
From: "Michael S. Tsirkin" <mst@redhat.com>
0a122b
Date: Tue, 17 Dec 2013 15:18:59 +0100
0a122b
Subject: [PATCH 45/56] hpet: fix build with CONFIG_HPET off
0a122b
0a122b
RH-Author: Michael S. Tsirkin <mst@redhat.com>
0a122b
Message-id: <1387293161-4085-46-git-send-email-mst@redhat.com>
0a122b
Patchwork-id: 56351
0a122b
O-Subject: [PATCH qemu-kvm RHEL7.0 v2 45/57] hpet: fix build with CONFIG_HPET off
0a122b
Bugzilla: 1034876
0a122b
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
0a122b
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
0a122b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
0a122b
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
0a122b
0a122b
make hpet_find inline so we don't need
0a122b
to build hpet.c to check if hpet is enabled.
0a122b
0a122b
Fixes link error with CONFIG_HPET off.
0a122b
0a122b
Cc: qemu-stable@nongnu.org
0a122b
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
0a122b
0a122b
Upstream status: posted
0a122b
---
0a122b
 include/hw/timer/hpet.h | 10 +++++++++-
0a122b
 hw/timer/hpet.c         |  5 -----
0a122b
 2 files changed, 9 insertions(+), 6 deletions(-)
0a122b
0a122b
Signed-off-by: Michal Novotny <minovotn@redhat.com>
0a122b
---
0a122b
 hw/timer/hpet.c         |  5 -----
0a122b
 include/hw/timer/hpet.h | 10 +++++++++-
0a122b
 2 files changed, 9 insertions(+), 6 deletions(-)
0a122b
0a122b
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
0a122b
index 8c26851..dd486a1 100644
0a122b
--- a/hw/timer/hpet.c
0a122b
+++ b/hw/timer/hpet.c
0a122b
@@ -744,11 +744,6 @@ static void hpet_device_class_init(ObjectClass *klass, void *data)
0a122b
     dc->props = hpet_device_properties;
0a122b
 }
0a122b
 
0a122b
-bool hpet_find(void)
0a122b
-{
0a122b
-    return object_resolve_path_type("", "hpet", NULL);
0a122b
-}
0a122b
-
0a122b
 static const TypeInfo hpet_device_info = {
0a122b
     .name          = "hpet",
0a122b
     .parent        = TYPE_SYS_BUS_DEVICE,
0a122b
diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h
0a122b
index ab44bd3..773953b 100644
0a122b
--- a/include/hw/timer/hpet.h
0a122b
+++ b/include/hw/timer/hpet.h
0a122b
@@ -13,6 +13,8 @@
0a122b
 #ifndef QEMU_HPET_EMUL_H
0a122b
 #define QEMU_HPET_EMUL_H
0a122b
 
0a122b
+#include "qom/object.h"
0a122b
+
0a122b
 #define HPET_BASE               0xfed00000
0a122b
 #define HPET_CLK_PERIOD         10000000ULL /* 10000000 femtoseconds == 10ns*/
0a122b
 
0a122b
@@ -72,5 +74,11 @@ struct hpet_fw_config
0a122b
 
0a122b
 extern struct hpet_fw_config hpet_cfg;
0a122b
 
0a122b
-bool hpet_find(void);
0a122b
+#define TYPE_HPET "hpet"
0a122b
+
0a122b
+static inline bool hpet_find(void)
0a122b
+{
0a122b
+    return object_resolve_path_type("", TYPE_HPET, NULL);
0a122b
+}
0a122b
+
0a122b
 #endif
0a122b
-- 
0a122b
1.7.11.7
0a122b