mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
net: usb: usbnet: use proper ep number macros
We have macros to retrieve endpoint numbers now. Use them. Signed-off-by: Oliver Neukum <oneukum@suse.com> Link: https://patch.msgid.link/20260513132916.39896-1-oneukum@suse.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
674822432a
commit
822d4a8e39
|
|
@ -149,10 +149,8 @@ int usbnet_get_endpoints(struct usbnet *dev, struct usb_interface *intf)
|
|||
return tmp;
|
||||
}
|
||||
|
||||
dev->in = usb_rcvbulkpipe(dev->udev,
|
||||
in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
|
||||
dev->out = usb_sndbulkpipe(dev->udev,
|
||||
out->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
|
||||
dev->in = usb_rcvbulkpipe(dev->udev, usb_endpoint_num(&in->desc));
|
||||
dev->out = usb_sndbulkpipe(dev->udev, usb_endpoint_num(&out->desc));
|
||||
dev->status = status;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -232,9 +230,7 @@ static int init_status(struct usbnet *dev, struct usb_interface *intf)
|
|||
if (!dev->driver_info->status)
|
||||
return 0;
|
||||
|
||||
pipe = usb_rcvintpipe(dev->udev,
|
||||
dev->status->desc.bEndpointAddress
|
||||
& USB_ENDPOINT_NUMBER_MASK);
|
||||
pipe = usb_rcvintpipe(dev->udev, usb_endpoint_num(&dev->status->desc));
|
||||
maxp = usb_maxpacket(dev->udev, pipe);
|
||||
|
||||
/* avoid 1 msec chatter: min 8 msec poll rate */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user