mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
qdev: Move bus properties to a separate global
Simple code movement in order to simplify future refactoring. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
2f262e06f0
commit
3cb75a7cba
9 changed files with 66 additions and 47 deletions
15
hw/usb/bus.c
15
hw/usb/bus.c
|
@ -11,19 +11,22 @@ static char *usb_get_dev_path(DeviceState *dev);
|
|||
static char *usb_get_fw_dev_path(DeviceState *qdev);
|
||||
static int usb_qdev_exit(DeviceState *qdev);
|
||||
|
||||
static Property usb_props[] = {
|
||||
DEFINE_PROP_STRING("port", USBDevice, port_path),
|
||||
DEFINE_PROP_BIT("full-path", USBDevice, flags,
|
||||
USB_DEV_FLAG_FULL_PATH, true),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
};
|
||||
|
||||
static struct BusInfo usb_bus_info = {
|
||||
.name = "USB",
|
||||
.size = sizeof(USBBus),
|
||||
.print_dev = usb_bus_dev_print,
|
||||
.get_dev_path = usb_get_dev_path,
|
||||
.get_fw_dev_path = usb_get_fw_dev_path,
|
||||
.props = (Property[]) {
|
||||
DEFINE_PROP_STRING("port", USBDevice, port_path),
|
||||
DEFINE_PROP_BIT("full-path", USBDevice, flags,
|
||||
USB_DEV_FLAG_FULL_PATH, true),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
},
|
||||
.props = usb_props,
|
||||
};
|
||||
|
||||
static int next_usb_bus = 0;
|
||||
static QTAILQ_HEAD(, USBBus) busses = QTAILQ_HEAD_INITIALIZER(busses);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue