Received: from eggs.gnu.org ([2001:4830:134:3::10]:58788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4zz3-0007XC-Ph for qemu-devel@nongnu.org; Wed, 09 Jul 2014 18:05:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4zyx-0008JP-Gk for qemu-devel@nongnu.org; Wed, 09 Jul 2014 18:05:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4zyx-0008JE-8A for qemu-devel@nongnu.org; Wed, 09 Jul 2014 18:04:55 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s69M4s6s007224 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 9 Jul 2014 18:04:54 -0400 From: Eduardo Habkost Date: Wed, 9 Jul 2014 19:04:04 -0300 Message-Id: <1404943462-711-8-git-send-email-ehabkost@redhat.com> In-Reply-To: <1404943462-711-1-git-send-email-ehabkost@redhat.com> References: <1404943462-711-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC 07/25] accel: Make AccelClass.available() optional List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org When we move accel classes outside accel.c, the available() function won't be necessary anymore, because the classes will be registered only if the accelerator code is really enable at build time. Signed-off-by: Eduardo Habkost --- hw/core/accel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/accel.c b/hw/core/accel.c index b42335c..b2a92b6 100644 --- a/hw/core/accel.c +++ b/hw/core/accel.c @@ -82,7 +82,7 @@ int configure_accelerator(MachineClass *mc) fprintf(stderr, "\"%s\" accelerator does not exist.\n", buf); continue; } - if (!acc->available()) { + if (acc->available && !acc->available()) { printf("%s not supported for this target\n", acc->name); continue; -- 1.9.3