comedi_to_usb_dev(9)
β¨ comedi_to_usb_dev(9) β¨
okay so this is from the Kernel API Manual, and it's literally all about one tiny helper that hands you the USB device connected to a COMEDI device. bestie, it's giving "small function, big vibes" π
π NAME π
comedi_to_usb_devβ Return USB device attached to COMEDI device. periodt π
β¨ SYNOPSIS β¨
struct usb_device * comedi_to_usb_dev (struct comedi_device *dev );
π ARGUMENTS π
devβ COMEDI device. that's the whole argument, bestie π
π¦ DESCRIPTION π¦
So here's the lore: assuming dev->hw_dev is non-NULL, it is assumed to be pointing to a a struct device embedded in a struct usb_interface π¦β¨
lowkey the important bit is thatdev->hw_devhas to be non-NULL, and it's assumed to be pointing at that embeddedstruct devicesituation. no cap.
πΈ RETURN πΈ
If dev->hw_dev is non-NULL, you get the USB device to which the USB interface belongs πΈ
If dev->hw_dev is NULL, you get NULL. that's it, fr fr π
π SEE ALSO π
Kernel file ./drivers/comedi/comedi_usb.c is the main character here, and you should also peek at:
comedi_to_usb_interface(9)comedi_usb_auto_config(9)comedi_usb_auto_unconfig(9)comedi_usb_driver_register(9)comedi_usb_driver_unregister(9)
mwah π this page is from the source ./drivers/comedi, dated October 2026, and versioned as comedi_to_usb_dev(9) β slay and stay iconic β¨π
π¦ 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