usb_interface_claimed(9)
π usb_interface_claimed(9) β a.k.a. the "is this interface taken?" check
okay so bestie, welcome to the Kernel API Manual page for usb_interface_claimed β yes it's a mouthful, yes it's iconic, and yes we're gonna get through it together π«Ά
β¨ NAME β¨
usb_interface_claimed β literally returns true iff an interface is claimed. that's it. that's the whole vibe check π
β¨ SYNOPSIS β¨
int usb_interface_claimed (struct usb_interface *iface );
like, one function, one argument, zero drama π
β¨ ARGUMENTS β¨
ifaceβ the interface being checked, aka the main character of this whole operation π
β¨ RETURN β¨
here's the tea π: it returns true (nonzero) iff the interface is claimed, and false (zero) otherwise. no in-between, no "it's complicated", just yes or no. slay.
β¨ NOTE β¨ πΈ
okay this part is important, pay attention bestie π
Callers must own the driver model's usb bus readlock. So the good news: driver probe entries don't need extra locking (they're already covered, no cap). The "well actually" news: other call contexts may need to explicitly claim that lock. fr fr, don't skip this one π
β¨ SEE ALSO β¨ π¦
- Kernel file
./include/linux/usb.h struct usb_host_endpoint(9)struct usb_interface(9)usb_set_intfdata(9)struct usb_interface_cache(9)struct usb_host_config(9)struct usb_device(9)usb_hub_for_each_child(9)usb_make_path(9)USB_DEVICE(9)USB_DEVICE_VER(9)USB_DEVICE_INTERFACE_CLASS(9)USB_DEVICE_INTERFACE_PROTOCOL(9)USB_DEVICE_INTERFACE_NUMBER(9)USB_DEVICE_INFO(9)USB_INTERFACE_INFO(9)USB_DEVICE_AND_INTERFACE_INFO(9)USB_VENDOR_AND_INTERFACE_INFO(9)struct usb_driver(9)struct usb_device_driver(9)struct usb_class_driver(9)module_usb_driver(9)struct urb(9)usb_fill_control_urb(9)usb_fill_bulk_urb(9)usb_fill_int_urb(9)usb_urb_dir_in(9)usb_urb_dir_out(9)struct usb_sg_request(9)
like, an entire friend group of cross-references, we love to see it π
and that's the page!! π this lil beauty lives in ./include/linux and the version/date on it is October 2026 β so mark your calendars, bestie πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms