qdev: add class_init to DeviceInfo
Since we are still dynamically creating TypeInfo, we need to chain the class_init function in order to be able to make use of it within subclasses of TYPE_DEVICE. This will disappear once we register TypeInfos directly. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
3cc90eb2b7
commit
3dde52d2fe
@ -54,6 +54,10 @@ static void qdev_subclass_init(ObjectClass *klass, void *data)
|
||||
|
||||
/* Poison to try to detect future uses */
|
||||
dc->info->reset = NULL;
|
||||
|
||||
if (dc->info->class_init) {
|
||||
dc->info->class_init(klass, data);
|
||||
}
|
||||
}
|
||||
|
||||
DeviceInfo *qdev_get_info(DeviceState *dev)
|
||||
|
Loading…
Reference in New Issue
Block a user