aboutsummaryrefslogtreecommitdiff
path: root/accel/accel.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel/accel.c')
-rw-r--r--accel/accel.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/accel/accel.c b/accel/accel.c
index 60c3827a9d..dd38a468af 100644
--- a/accel/accel.c
+++ b/accel/accel.c
@@ -48,9 +48,7 @@ AccelClass *accel_find(const char *opt_name)
int accel_init_machine(AccelClass *acc, MachineState *ms)
{
- ObjectClass *oc = OBJECT_CLASS(acc);
- const char *cname = object_class_get_name(oc);
- AccelState *accel = ACCEL(object_new(cname));
+ AccelState *accel = ACCEL(object_new_with_class(OBJECT_CLASS(acc)));
int ret;
ms->accelerator = accel;
*(acc->allowed) = true;