Revision eb5e680a usb-linux.c

b/usb-linux.c
335 335
    }
336 336
}
337 337

  
338
static void async_cancel(USBPacket *p, void *opaque)
338
static void usb_host_async_cancel(USBDevice *dev, USBPacket *p)
339 339
{
340
    USBHostDevice *s = opaque;
340
    USBHostDevice *s = DO_UPCAST(USBHostDevice, dev, dev);
341 341
    AsyncURB *aurb;
342 342

  
343 343
    QLIST_FOREACH(aurb, &s->aurbs, next) {
......
736 736
        }
737 737
    }
738 738

  
739
    usb_defer_packet(p, async_cancel, s);
740 739
    return USB_RET_ASYNC;
741 740
}
742 741

  
......
868 867
        }
869 868
    }
870 869

  
871
    usb_defer_packet(p, async_cancel, s);
872 870
    return USB_RET_ASYNC;
873 871
}
874 872

  
......
1197 1195
    .qdev.size      = sizeof(USBHostDevice),
1198 1196
    .init           = usb_host_initfn,
1199 1197
    .handle_packet  = usb_generic_handle_packet,
1198
    .cancel_packet  = usb_host_async_cancel,
1200 1199
    .handle_data    = usb_host_handle_data,
1201 1200
    .handle_control = usb_host_handle_control,
1202 1201
    .handle_reset   = usb_host_handle_reset,

Also available in: Unified diff