summaryrefslogtreecommitdiff
path: root/usb-bsd.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-01-12 13:23:01 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-02-10 11:31:57 +0100
commit079d0b7f1eedcc634c371fe05b617fdc55c8b762 (patch)
tree60ee42f36b295edb49fcb62af5912f769efa9991 /usb-bsd.c
parent63095ab54c1ce554b1fc825fc678394ccb129e5b (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-bsd.c')
-rw-r--r--usb-bsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usb-bsd.c b/usb-bsd.c
index ca9a1bdc61..e4c01d3c02 100644
--- a/usb-bsd.c
+++ b/usb-bsd.c
@@ -214,7 +214,7 @@ static int usb_host_handle_data(USBDevice *dev, USBPacket *p)
int ret, fd, mode;
int one = 1, shortpacket = 0, timeout = 50;
sigset_t new_mask, old_mask;
- uint8_t devep = p->devep;
+ uint8_t devep = p->ep->nr;
/* protect data transfers from SIGALRM signal */
sigemptyset(&new_mask);