diff options
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/bus.c | 12 | ||||
-rw-r--r-- | hw/usb/ccid-card-emulated.c | 2 | ||||
-rw-r--r-- | hw/usb/ccid.h | 2 | ||||
-rw-r--r-- | hw/usb/dev-audio.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-hid.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-hub.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-network.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-smartcard-reader.c | 11 | ||||
-rw-r--r-- | hw/usb/dev-uas.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-wacom.c | 2 | ||||
-rw-r--r-- | hw/usb/hcd-ehci-pci.c | 2 | ||||
-rw-r--r-- | hw/usb/hcd-ehci.c | 2 | ||||
-rw-r--r-- | hw/usb/hcd-ehci.h | 2 | ||||
-rw-r--r-- | hw/usb/host-libusb.c | 2 | ||||
-rw-r--r-- | hw/usb/redirect.c | 2 |
15 files changed, 22 insertions, 27 deletions
diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 686f492112..fa07df98a2 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -14,7 +14,7 @@ static void usb_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent); static char *usb_get_dev_path(DeviceState *dev); static char *usb_get_fw_dev_path(DeviceState *qdev); -static void usb_qdev_unrealize(DeviceState *qdev, Error **errp); +static void usb_qdev_unrealize(DeviceState *qdev); static Property usb_props[] = { DEFINE_PROP_STRING("port", USBDevice, port_path), @@ -130,12 +130,12 @@ USBDevice *usb_device_find_device(USBDevice *dev, uint8_t addr) return NULL; } -static void usb_device_unrealize(USBDevice *dev, Error **errp) +static void usb_device_unrealize(USBDevice *dev) { USBDeviceClass *klass = USB_DEVICE_GET_CLASS(dev); if (klass->unrealize) { - klass->unrealize(dev, errp); + klass->unrealize(dev); } } @@ -265,14 +265,14 @@ static void usb_qdev_realize(DeviceState *qdev, Error **errp) if (dev->auto_attach) { usb_device_attach(dev, &local_err); if (local_err) { - usb_qdev_unrealize(qdev, NULL); + usb_qdev_unrealize(qdev); error_propagate(errp, local_err); return; } } } -static void usb_qdev_unrealize(DeviceState *qdev, Error **errp) +static void usb_qdev_unrealize(DeviceState *qdev) { USBDevice *dev = USB_DEVICE(qdev); USBDescString *s, *next; @@ -286,7 +286,7 @@ static void usb_qdev_unrealize(DeviceState *qdev, Error **errp) if (dev->attached) { usb_device_detach(dev); } - usb_device_unrealize(dev, errp); + usb_device_unrealize(dev); if (dev->port) { usb_release_port(dev); } diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 3083124556..7d6105ef34 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -562,7 +562,7 @@ out1: qemu_mutex_destroy(&card->event_list_mutex); } -static void emulated_unrealize(CCIDCardState *base, Error **errp) +static void emulated_unrealize(CCIDCardState *base) { EmulatedState *card = EMULATED_CCID_CARD(base); VEvent *vevent = vevent_new(VEVENT_LAST, NULL, NULL); diff --git a/hw/usb/ccid.h b/hw/usb/ccid.h index bb2fdbfff3..531bf28fb0 100644 --- a/hw/usb/ccid.h +++ b/hw/usb/ccid.h @@ -36,7 +36,7 @@ typedef struct CCIDCardClass { const uint8_t *apdu, uint32_t len); void (*realize)(CCIDCardState *card, Error **errp); - void (*unrealize)(CCIDCardState *card, Error **errp); + void (*unrealize)(CCIDCardState *card); } CCIDCardClass; /* diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index 6fa213fad5..1371c44f48 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -923,7 +923,7 @@ static void usb_audio_handle_data(USBDevice *dev, USBPacket *p) } } -static void usb_audio_unrealize(USBDevice *dev, Error **errp) +static void usb_audio_unrealize(USBDevice *dev) { USBAudioState *s = USB_AUDIO(dev); diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index 67ec8b69ec..89f63b698b 100644 --- a/hw/usb/dev-hid.c +++ b/hw/usb/dev-hid.c @@ -699,7 +699,7 @@ static void usb_hid_handle_data(USBDevice *dev, USBPacket *p) } } -static void usb_hid_unrealize(USBDevice *dev, Error **errp) +static void usb_hid_unrealize(USBDevice *dev) { USBHIDState *us = USB_HID(dev); diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 49a573b346..5f19dd9fb5 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -565,7 +565,7 @@ static void usb_hub_handle_data(USBDevice *dev, USBPacket *p) } } -static void usb_hub_unrealize(USBDevice *dev, Error **errp) +static void usb_hub_unrealize(USBDevice *dev) { USBHubState *s = (USBHubState *)dev; int i; diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index 720744488b..c69756709b 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -1326,7 +1326,7 @@ static void usbnet_cleanup(NetClientState *nc) s->nic = NULL; } -static void usb_net_unrealize(USBDevice *dev, Error **errp) +static void usb_net_unrealize(USBDevice *dev) { USBNetState *s = (USBNetState *) dev; diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index ef72738ced..ada18c1983 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -1146,7 +1146,7 @@ static void ccid_handle_data(USBDevice *dev, USBPacket *p) } } -static void ccid_unrealize(USBDevice *dev, Error **errp) +static void ccid_unrealize(USBDevice *dev) { USBCCIDState *s = USB_CCID_DEV(dev); @@ -1269,23 +1269,18 @@ void ccid_card_card_inserted(CCIDCardState *card) ccid_on_slot_change(s, true); } -static void ccid_card_unrealize(DeviceState *qdev, Error **errp) +static void ccid_card_unrealize(DeviceState *qdev) { CCIDCardState *card = CCID_CARD(qdev); CCIDCardClass *cc = CCID_CARD_GET_CLASS(card); USBDevice *dev = USB_DEVICE(qdev->parent_bus->parent); USBCCIDState *s = USB_CCID_DEV(dev); - Error *local_err = NULL; if (ccid_card_inserted(s)) { ccid_card_card_removed(card); } if (cc->unrealize) { - cc->unrealize(card, &local_err); - if (local_err != NULL) { - error_propagate(errp, local_err); - return; - } + cc->unrealize(card); } s->card = NULL; } diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 11a8684cc2..a3a4d41c07 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -894,7 +894,7 @@ static void usb_uas_handle_data(USBDevice *dev, USBPacket *p) } } -static void usb_uas_unrealize(USBDevice *dev, Error **errp) +static void usb_uas_unrealize(USBDevice *dev) { UASDevice *uas = USB_UAS(dev); diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index 8ed57b3b44..8aba44b8bc 100644 --- a/hw/usb/dev-wacom.c +++ b/hw/usb/dev-wacom.c @@ -331,7 +331,7 @@ static void usb_wacom_handle_data(USBDevice *dev, USBPacket *p) } } -static void usb_wacom_unrealize(USBDevice *dev, Error **errp) +static void usb_wacom_unrealize(USBDevice *dev) { USBWacomState *s = (USBWacomState *) dev; diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c index fc73a054c6..4c37c8e227 100644 --- a/hw/usb/hcd-ehci-pci.c +++ b/hw/usb/hcd-ehci-pci.c @@ -105,7 +105,7 @@ static void usb_ehci_pci_exit(PCIDevice *dev) EHCIPCIState *i = PCI_EHCI(dev); EHCIState *s = &i->ehci; - usb_ehci_unrealize(s, DEVICE(dev), NULL); + usb_ehci_unrealize(s, DEVICE(dev)); g_free(s->irq); s->irq = NULL; diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 29d49c2d7e..1495e8f7fa 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -2522,7 +2522,7 @@ void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp) s->vmstate = qemu_add_vm_change_state_handler(usb_ehci_vm_state_change, s); } -void usb_ehci_unrealize(EHCIState *s, DeviceState *dev, Error **errp) +void usb_ehci_unrealize(EHCIState *s, DeviceState *dev) { trace_usb_ehci_unrealize(); diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index edb59311c4..57b38cfc05 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -324,7 +324,7 @@ extern const VMStateDescription vmstate_ehci; void usb_ehci_init(EHCIState *s, DeviceState *dev); void usb_ehci_finalize(EHCIState *s); void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp); -void usb_ehci_unrealize(EHCIState *s, DeviceState *dev, Error **errp); +void usb_ehci_unrealize(EHCIState *s, DeviceState *dev); void ehci_reset(void *opaque); #define TYPE_PCI_EHCI "pci-ehci-usb" diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 78a5c2ba55..e28441379d 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1104,7 +1104,7 @@ static void usb_host_instance_init(Object *obj) &udev->qdev); } -static void usb_host_unrealize(USBDevice *udev, Error **errp) +static void usb_host_unrealize(USBDevice *udev) { USBHostDevice *s = USB_HOST_DEVICE(udev); diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index e9a97feaed..417a60a2e6 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1468,7 +1468,7 @@ static void usbredir_cleanup_device_queues(USBRedirDevice *dev) } } -static void usbredir_unrealize(USBDevice *udev, Error **errp) +static void usbredir_unrealize(USBDevice *udev) { USBRedirDevice *dev = USB_REDIRECT(udev); |