aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/host-libusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/host-libusb.c')
-rw-r--r--hw/usb/host-libusb.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 80122b4..b74670a 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -51,8 +51,8 @@
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"
-#include "sysemu/runstate.h"
-#include "sysemu/sysemu.h"
+#include "system/runstate.h"
+#include "system/system.h"
#include "trace.h"
#include "hw/qdev-properties.h"
@@ -1212,9 +1212,8 @@ static void usb_host_realize(USBDevice *udev, Error **errp)
if (s->hostdevice) {
int fd;
s->needs_autoscan = false;
- fd = qemu_open_old(s->hostdevice, O_RDWR);
+ fd = qemu_open(s->hostdevice, O_RDWR, errp);
if (fd < 0) {
- error_setg_errno(errp, errno, "failed to open %s", s->hostdevice);
return;
}
rc = usb_host_open(s, NULL, fd);
@@ -1759,7 +1758,7 @@ static const VMStateDescription vmstate_usb_host = {
}
};
-static Property usb_host_dev_properties[] = {
+static const Property usb_host_dev_properties[] = {
DEFINE_PROP_UINT32("hostbus", USBHostDevice, match.bus_num, 0),
DEFINE_PROP_UINT32("hostaddr", USBHostDevice, match.addr, 0),
DEFINE_PROP_STRING("hostport", USBHostDevice, match.port),
@@ -1780,10 +1779,9 @@ static Property usb_host_dev_properties[] = {
USB_HOST_OPT_PIPELINE, true),
DEFINE_PROP_BOOL("suppress-remote-wake", USBHostDevice,
suppress_remote_wake, true),
- DEFINE_PROP_END_OF_LIST(),
};
-static void usb_host_class_initfn(ObjectClass *klass, void *data)
+static void usb_host_class_initfn(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
USBDeviceClass *uc = USB_DEVICE_CLASS(klass);