usb-bus: remove "init" from USBDeviceClass struct
All usb-bus devices are realized by realize(), remove init callback function from USBDeviceClass struct. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
df9bb6660d
commit
bd2ba2752d
|
@ -113,8 +113,6 @@ static void usb_device_realize(USBDevice *dev, Error **errp)
|
||||||
|
|
||||||
if (klass->realize) {
|
if (klass->realize) {
|
||||||
klass->realize(dev, errp);
|
klass->realize(dev, errp);
|
||||||
} else if (klass->init) {
|
|
||||||
klass->init(dev);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -273,8 +273,6 @@ typedef void (*USBDeviceUnrealize)(USBDevice *dev, Error **errp);
|
||||||
typedef struct USBDeviceClass {
|
typedef struct USBDeviceClass {
|
||||||
DeviceClass parent_class;
|
DeviceClass parent_class;
|
||||||
|
|
||||||
int (*init)(USBDevice *dev);
|
|
||||||
|
|
||||||
USBDeviceRealize realize;
|
USBDeviceRealize realize;
|
||||||
USBDeviceUnrealize unrealize;
|
USBDeviceUnrealize unrealize;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue