diff options
author | David S. Miller | 2009-12-25 16:34:56 -0800 |
---|---|---|
committer | David S. Miller | 2009-12-25 16:34:56 -0800 |
commit | d346f49d0badd80aa9fc699fa9c6d5b23e778eb6 (patch) | |
tree | 9e9698ffe7966fbe7ce924a30843f87cdfa2646e /drivers/net/wireless/zd1211rw | |
parent | d87fd25d5ac4cd044e21b749a8f6cac90f093c71 (diff) | |
parent | b6ce5c33001b1dc83e6a1a6f30c5dccccea651b6 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/zd1211rw')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_usb.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index ac19ecd19cfe..4daf1c94ec04 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c @@ -1078,11 +1078,15 @@ static int eject_installer(struct usb_interface *intf) int r; /* Find bulk out endpoint */ - endpoint = &iface_desc->endpoint[1].desc; - if (usb_endpoint_dir_out(endpoint) && - usb_endpoint_xfer_bulk(endpoint)) { - bulk_out_ep = endpoint->bEndpointAddress; - } else { + for (r = 1; r >= 0; r--) { + endpoint = &iface_desc->endpoint[r].desc; + if (usb_endpoint_dir_out(endpoint) && + usb_endpoint_xfer_bulk(endpoint)) { + bulk_out_ep = endpoint->bEndpointAddress; + break; + } + } + if (r == -1) { dev_err(&udev->dev, "zd1211rw: Could not find bulk out endpoint\n"); return -ENODEV; |