diff mbox

[PULL,13/28] accel: Make AccelClass.available() optional

Message ID 1412849855-12661-6-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini Oct. 9, 2014, 10:17 a.m. UTC
From: Eduardo Habkost <ehabkost@redhat.com>

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 enabled at build time.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 accel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/accel.c b/accel.c
index a3e2fd9..85177f1 100644
--- a/accel.c
+++ b/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;