Signed-off-by: Pavel Roskin <proski@xxxxxxx> --- drivers/net/wireless/at76_usb.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/at76_usb.c b/drivers/net/wireless/at76_usb.c index f2a74d4..be9ef6e 100644 --- a/drivers/net/wireless/at76_usb.c +++ b/drivers/net/wireless/at76_usb.c @@ -2045,10 +2045,7 @@ static int at76_alloc_urbs(struct at76_priv *priv, __func__, i, endpoint->bEndpointAddress, endpoint->bmAttributes); - if ((endpoint->bEndpointAddress & 0x80) && - ((endpoint->bmAttributes & 3) == 0x02)) { - /* we found a bulk in endpoint */ - + if (usb_endpoint_is_bulk_in(endpoint)) { priv->read_urb = usb_alloc_urb(0, GFP_KERNEL); if (!priv->read_urb) { err("No free urbs available"); @@ -2058,9 +2055,7 @@ static int at76_alloc_urbs(struct at76_priv *priv, usb_rcvbulkpipe(udev, endpoint->bEndpointAddress); } - if (((endpoint->bEndpointAddress & 0x80) == 0x00) && - ((endpoint->bmAttributes & 3) == 0x02)) { - /* we found a bulk out endpoint */ + if (usb_endpoint_is_bulk_out(endpoint)) { priv->write_urb = usb_alloc_urb(0, GFP_KERNEL); if (!priv->write_urb) { err("no free urbs available"); - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html