USB: usbnet: Use usb_endpoint_* functions

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Luiz Fernando N. Capitulino
2006-10-26 13:03:01 -03:00
committed by Greg Kroah-Hartman
parent 30f36ef922
commit fc6e2544bd

View File

@@ -116,7 +116,7 @@ int usbnet_get_endpoints(struct usbnet *dev, struct usb_interface *intf)
e = alt->endpoint + ep; e = alt->endpoint + ep;
switch (e->desc.bmAttributes) { switch (e->desc.bmAttributes) {
case USB_ENDPOINT_XFER_INT: case USB_ENDPOINT_XFER_INT:
if (!(e->desc.bEndpointAddress & USB_DIR_IN)) if (!usb_endpoint_dir_in(&e->desc))
continue; continue;
intr = 1; intr = 1;
/* FALLTHROUGH */ /* FALLTHROUGH */
@@ -125,7 +125,7 @@ int usbnet_get_endpoints(struct usbnet *dev, struct usb_interface *intf)
default: default:
continue; continue;
} }
if (e->desc.bEndpointAddress & USB_DIR_IN) { if (usb_endpoint_dir_in(&e->desc)) {
if (!intr && !in) if (!intr && !in)
in = e; in = e;
else if (intr && !status) else if (intr && !status)