usb-bus: convert USBDeviceClass init to realize
commit7d553f27fce284805d7f94603932045ee3bbb979
authorGonglei <arei.gonglei@huawei.com>
Fri, 19 Sep 2014 06:48:24 +0000 (19 14:48 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 23 Sep 2014 10:51:06 +0000 (23 12:51 +0200)
treeb1b83b4c53a460660bcaedb45647c28e05397dca
parentdc1f5988454d9dac8b9ba0c35266c8b4bc33ffa1
usb-bus: convert USBDeviceClass init to realize

Add "realize/unrealize" in USBDeviceClass, which has errp
as a parameter. So all the implementations now use
error_setg instead of error_report for reporting error.

Note: this patch still keep "init" in USBDeviceClass, and
call kclass->init in usb_device_realize(), avoid breaking
git bisect. After realize all usb devices, will be removed.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/bus.c
hw/usb/dev-serial.c
hw/usb/dev-storage.c
hw/usb/host-libusb.c
hw/usb/redirect.c
include/hw/usb.h