@@ -9,7 +9,8 @@ int sysbus_device_create_devtree(Object *obj, void *opaque)
PlatformDevtreeData *data = opaque;
Object *dev;
SysBusDevice *sbdev;
- bool matched = false;
+ SysBusDeviceClass *k;
+
dev = object_dynamic_cast(obj, TYPE_SYS_BUS_DEVICE);
sbdev = (SysBusDevice *)dev;
@@ -19,12 +20,8 @@ int sysbus_device_create_devtree(Object *obj, void *opaque)
return object_child_foreach(obj, sysbus_device_create_devtree, data);
}
- if (!matched) {
- error_report("Device %s is not supported by this machine yet.",
- qdev_fw_name(DEVICE(dev)));
- exit(1);
- }
-
+ k = SYS_BUS_DEVICE_GET_CLASS(dev);
+ k->fdt_add_node(sbdev, data);
return 0;
}
Creation of the node in the device tree relies on the new sysbus fdt_add_node method. Signed-off-by: Eric Auger <eric.auger@linaro.org> --- hw/misc/platform_devices.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)