From: Eduardo Habkost Date: Fri, 26 Sep 2014 20:45:22 +0000 (-0300) Subject: accel: Make AccelClass.available() optional X-Git-Tag: qemu-xen-4.6.0-rc1~137^2~15 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f6dfb83547d0cf5aa938cce391ba33c32a97bed9;p=qemu-upstream-4.6-testing.git 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 Signed-off-by: Eduardo Habkost Signed-off-by: Paolo Bonzini --- diff --git a/accel.c b/accel.c index a3e2fd914..85177f1b5 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;