summaryrefslogtreecommitdiff
path: root/accel.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2014-09-26 17:45:22 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2014-10-04 08:59:15 +0200
commitf6dfb83547d0cf5aa938cce391ba33c32a97bed9 (patch)
treef328ee0baf0c233809ebc3f26f0fd2d92f5164dd /accel.c
parentb14a0b7469fa3e6c26d18438531d26138c55b67e (diff)
downloadqemu-f6dfb83547d0cf5aa938cce391ba33c32a97bed9.tar.gz
qemu-f6dfb83547d0cf5aa938cce391ba33c32a97bed9.tar.bz2
qemu-f6dfb83547d0cf5aa938cce391ba33c32a97bed9.zip
accel: Make AccelClass.available() optional
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>
Diffstat (limited to 'accel.c')
-rw-r--r--accel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel.c b/accel.c
index a3e2fd9149..85177f1b52 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;