diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-01-12 13:23:01 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-10 11:31:57 +0100 |
commit | 079d0b7f1eedcc634c371fe05b617fdc55c8b762 (patch) | |
tree | 60ee42f36b295edb49fcb62af5912f769efa9991 /usb-redir.c | |
parent | 63095ab54c1ce554b1fc825fc678394ccb129e5b (diff) |
usb: Set USBEndpoint in usb_packet_setup().
With the separation of the device lookup (via usb_find_device) and
packet processing we can lookup device and endpoint before setting up
the usb packet. So we can initialize USBPacket->ep early and keep it
valid for the whole lifecycle of the USBPacket. Also the devaddr and
devep fields are not needed any more.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'usb-redir.c')
-rw-r--r-- | usb-redir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usb-redir.c b/usb-redir.c index d2769a8431..15e2b12aac 100644 --- a/usb-redir.c +++ b/usb-redir.c @@ -610,7 +610,7 @@ static int usbredir_handle_data(USBDevice *udev, USBPacket *p) USBRedirDevice *dev = DO_UPCAST(USBRedirDevice, dev, udev); uint8_t ep; - ep = p->devep; + ep = p->ep->nr; if (p->pid == USB_TOKEN_IN) { ep |= USB_DIR_IN; } |