diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-07-19 18:06:15 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-07-19 18:06:15 +0000 |
commit | 059809e45160fda714edf645902db95e262886e9 (patch) | |
tree | 06c7c0c578bbbf43e8c8d843c61a63dec484dd4e /hw/usb-hub.c | |
parent | 3b2ccc57c74a3a7405dabd36f7abacd3eff46b46 (diff) |
usb destroy API change (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2066 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb-hub.c')
-rw-r--r-- | hw/usb-hub.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/hw/usb-hub.c b/hw/usb-hub.c index 2eba905ff5..8350931be6 100644 --- a/hw/usb-hub.c +++ b/hw/usb-hub.c @@ -199,11 +199,9 @@ static void usb_hub_attach(USBPort *port1, USBDevice *dev) } } -static void usb_hub_handle_reset(USBDevice *dev, int destroy) +static void usb_hub_handle_reset(USBDevice *dev) { /* XXX: do it */ - if (destroy) - qemu_free(dev); } static int usb_hub_handle_control(USBDevice *dev, int request, int value, @@ -525,6 +523,13 @@ static int usb_hub_handle_packet(USBDevice *dev, int pid, return usb_generic_handle_packet(dev, pid, devaddr, devep, data, len); } +static void usb_hub_handle_destroy(USBDevice *dev) +{ + USBHubState *s = (USBHubState *)dev; + + qemu_free(s); +} + USBDevice *usb_hub_init(int nb_ports) { USBHubState *s; @@ -543,6 +548,7 @@ USBDevice *usb_hub_init(int nb_ports) s->dev.handle_reset = usb_hub_handle_reset; s->dev.handle_control = usb_hub_handle_control; s->dev.handle_data = usb_hub_handle_data; + s->dev.handle_destroy = usb_hub_handle_destroy; pstrcpy(s->dev.devname, sizeof(s->dev.devname), "QEMU USB Hub"); |