diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-01-27 14:17:59 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-27 11:13:26 +0100 |
commit | 326700e35d2ac05ab83b91bf4857eedcdc049a30 (patch) | |
tree | d2e8ff91209a238427d91039436cb91cbec61217 /hw/usb-uhci.c | |
parent | 81d37739dfded2ebd992f3bf8ae5d6cb1a0558cc (diff) |
usb-uhci: cleanup UHCIAsync allocation & initialization.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-uhci.c')
-rw-r--r-- | hw/usb-uhci.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 2280dc792d..ca87290bf1 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -159,15 +159,9 @@ typedef struct UHCI_QH { static UHCIAsync *uhci_async_alloc(UHCIState *s) { - UHCIAsync *async = g_malloc(sizeof(UHCIAsync)); + UHCIAsync *async = g_new0(UHCIAsync, 1); - memset(&async->packet, 0, sizeof(async->packet)); async->uhci = s; - async->valid = 0; - async->td = 0; - async->token = 0; - async->done = 0; - async->isoc = 0; usb_packet_init(&async->packet); pci_dma_sglist_init(&async->sgl, &s->dev, 1); |