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 <ehabk...@redhat.com>
---
 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


Reply via email to