From patchwork Mon May 24 15:18:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 53428 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D363DB7D30 for ; Tue, 25 May 2010 01:20:09 +1000 (EST) Received: from localhost ([127.0.0.1]:52767 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGZRk-000604-UV for incoming@patchwork.ozlabs.org; Mon, 24 May 2010 11:20:04 -0400 Received: from [140.186.70.92] (port=41640 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGZQH-0005vT-Ea for qemu-devel@nongnu.org; Mon, 24 May 2010 11:18:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGZQG-00005D-0B for qemu-devel@nongnu.org; Mon, 24 May 2010 11:18:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9030) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGZQF-0008WV-O9 for qemu-devel@nongnu.org; Mon, 24 May 2010 11:18:31 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4OFITOM019686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 May 2010 11:18:29 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4OFIMLw009416; Mon, 24 May 2010 11:18:27 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 24 May 2010 17:18:18 +0200 Message-Id: <853d34b0970150fa2e1df7a05edd6d8942a4d8e3.1274714215.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 3/6] Move no_hpet test to inside hpet_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- hw/hpet.c | 3 +++ hw/pc.c | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/hpet.c b/hw/hpet.c index 8729fb2..0ef3335 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -570,6 +570,9 @@ void hpet_init(qemu_irq *irq) { DPRINTF ("hpet_init\n"); + if (no_hpet) + return; + s = qemu_mallocz(sizeof(HPETState)); hpet_statep = s; s->irqs = irq; diff --git a/hw/pc.c b/hw/pc.c index e7f31d3..ccff3ec 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -944,9 +944,7 @@ void pc_basic_device_init(qemu_irq *isa_irq, pit = pit_init(0x40, isa_reserve_irq(0)); pcspk_init(pit); - if (!no_hpet) { - hpet_init(isa_irq); - } + hpet_init(isa_irq); for(i = 0; i < MAX_SERIAL_PORTS; i++) { if (serial_hds[i]) {