usb_find_common_endpoints(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… usb_find_common_endpoints(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for usb_find_common_endpoints β€” yes that's the whole function name, no we're not shortening it, she's iconic and she's got a long name, deal with it πŸ’–


✨ NAME ✨

usb_find_common_endpoints β€” look up common endpoint descriptors πŸŽ€


🌸 SYNOPSIS 🌸

int usb_find_common_endpoints (struct usb_host_interface *alt , struct
usb_endpoint_descriptor **bulk_in , struct usb_endpoint_descriptor
**bulk_out , struct usb_endpoint_descriptor **int_in , struct
usb_endpoint_descriptor **int_out );

like, five arguments, one int return, she's serving function signature realness πŸ”₯


πŸ¦‹ ARGUMENTS πŸ¦‹

  • alt β€” the alternate setting the function goes searching through, no cap πŸ”
  • bulk_in β€” pointer to a descriptor pointer, or NULL. your girl gets to skip it if you pass NULL, we love options πŸ’œ
  • bulk_out β€” pointer to a descriptor pointer, or NULL
  • int_in β€” pointer to a descriptor pointer, or NULL
  • int_out β€” pointer to a descriptor pointer, or NULL

πŸ’– DESCRIPTION πŸ’–

So here's the tea: this function searches the alternate setting's endpoint descriptors for the first bulk-in, bulk-out, interrupt-in and interrupt-out endpoints, and it returns them in the provided pointers β€” but only the ones you actually asked for, because if a pointer is NULL she's literally not touching it, okay? πŸ™ˆ

And if a requested endpoint is not found? the corresponding pointer gets set to NULL. not found bestie, moving on, we don't dwell πŸ’…


⭐ RETURN ⭐

  • Zero if all requested descriptors were found β€” slay, everything ate πŸ‘‘
  • -ENXIO otherwise β€” not the vibe, some endpoint ghosted us 😭

🌈 SEE ALSO 🌈

the whole usb friend group fr fr 🫢


signed, sealed, delivered by ./drivers/usb/core β€” dated October 2026 β€” page usb_find_common_endpoints(9), and that's periodt πŸ’…βœ¨

πŸ“¦ where this page comes from