Instead of having all TYPE_CCW_DEVICE children set the bus type to
TYPE_VIRTUAL_CSS_BUS, do it once in the abstract parent.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <
20210424145313.
3287400-1-f4bug@amsat.org>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
DeviceClass *dc = DEVICE_CLASS(klass);
device_class_set_props(dc, emulated_ccw_3270_properties);
- dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
dc->realize = emulated_ccw_3270_realize;
dc->hotpluggable = false;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
k->refill_ids = ccw_device_refill_ids;
device_class_set_props(dc, ccw_device_properties);
dc->reset = ccw_device_reset;
+ dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
}
const VMStateDescription vmstate_ccw_dev = {
#include "qom/object.h"
#include "hw/qdev-core.h"
#include "hw/s390x/css.h"
+#include "hw/s390x/css-bridge.h"
struct CcwDevice {
DeviceState parent_obj;
static void s390_ccw_class_init(ObjectClass *klass, void *data)
{
- DeviceClass *dc = DEVICE_CLASS(klass);
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_CLASS(klass);
- dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
cdc->realize = s390_ccw_realize;
cdc->unrealize = s390_ccw_unrealize;
}
k->unplug = virtio_ccw_busdev_unplug;
dc->realize = virtio_ccw_busdev_realize;
dc->unrealize = virtio_ccw_busdev_unrealize;
- dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
device_class_set_parent_reset(dc, virtio_ccw_reset, &vdc->parent_reset);
}