]> git.proxmox.com Git - qemu.git/blobdiff - hw/milkymist-softusb.c
Merge remote-tracking branch 'spice/spice.v39' into staging
[qemu.git] / hw / milkymist-softusb.c
index 15652602790d7116fbe30414c4c030fe9bb84c63..ce2bfc60f28e9c729f5dde966aada06120b52e3d 100644 (file)
@@ -131,7 +131,7 @@ static inline void softusb_read_dmem(MilkymistSoftUsbState *s,
 {
     if (offset + len >= s->dmem_size) {
         error_report("milkymist_softusb: read dmem out of bounds "
-                "at offset 0x%x, len %d\n", offset, len);
+                "at offset 0x%x, len %d", offset, len);
         return;
     }
 
@@ -143,7 +143,7 @@ static inline void softusb_write_dmem(MilkymistSoftUsbState *s,
 {
     if (offset + len >= s->dmem_size) {
         error_report("milkymist_softusb: write dmem out of bounds "
-                "at offset 0x%x, len %d\n", offset, len);
+                "at offset 0x%x, len %d", offset, len);
         return;
     }
 
@@ -155,7 +155,7 @@ static inline void softusb_read_pmem(MilkymistSoftUsbState *s,
 {
     if (offset + len >= s->pmem_size) {
         error_report("milkymist_softusb: read pmem out of bounds "
-                "at offset 0x%x, len %d\n", offset, len);
+                "at offset 0x%x, len %d", offset, len);
         return;
     }
 
@@ -167,7 +167,7 @@ static inline void softusb_write_pmem(MilkymistSoftUsbState *s,
 {
     if (offset + len >= s->pmem_size) {
         error_report("milkymist_softusb: write pmem out of bounds "
-                "at offset 0x%x, len %d\n", offset, len);
+                "at offset 0x%x, len %d", offset, len);
         return;
     }
 
@@ -247,8 +247,21 @@ static void softusb_attach(USBPort *port)
 {
 }
 
+static void softusb_detach(USBPort *port)
+{
+}
+
+static void softusb_child_detach(USBPort *port, USBDevice *child)
+{
+}
+
 static USBPortOps softusb_ops = {
     .attach = softusb_attach,
+    .detach = softusb_detach,
+    .child_detach = softusb_child_detach,
+};
+
+static USBBusOps softusb_bus_ops = {
 };
 
 static void milkymist_softusb_reset(DeviceState *d)
@@ -294,7 +307,7 @@ static int milkymist_softusb_init(SysBusDevice *dev)
     qemu_add_mouse_event_handler(softusb_mouse_event, s, 0, "Milkymist Mouse");
 
     /* create our usb bus */
-    usb_bus_new(&s->usbbus, NULL);
+    usb_bus_new(&s->usbbus, &softusb_bus_ops, NULL);
 
     /* our two ports */
     usb_register_port(&s->usbbus, &s->usbport[0], NULL, 0, &softusb_ops,