STRUCT USB_CLASS_DRIVER(9)
π struct usb_class_driver(9) π
okay so welcome to the Kernel API Manual, bestie β¨ this page is all about struct usb_class_driver β the struct that identifies a USB driver that wants to use the USB major number. periodt. π
πΈ NAME πΈ
struct usb_class_driver β identifies a USB driver that wants to use the USB major number. no cap, thatβs the whole vibe. π«Ά
π SYNOPSIS π
struct usb_class_driver {
char *name;
char *(*devnode)(const struct device *dev, umode_t *mode);
const struct file_operations *fops;
int minor_base;
};
π«Ά Members π«Ά
nameβ the usb class device name for this driver. it will show up insysfs, bestie, so itβs literally visible. πβ¨devnodeβ callback to provide a naming hint for a possible device node to create. itβs giving βhereβs a lil hintβ energy. π§fopsβ pointer to thestruct file_operationsof this driver. iconic pointer behavior. π«minor_baseβ the start of the minor range for this driver. thatβs where the minors begin, fr fr. π
π¦ Description π¦
This structure is used for the usb_register_dev and usb_deregister_dev functions β itβs there to consolidate a number of the parameters used for them. lowkey just doing its main character job of bundling things together. π
π SEE ALSO π
Kernel file ./include/linux/usb.h, plus all these besties:
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_interface_claimed(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)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)
mwah π this page lives in ./include/linux and is dated October 2026 β thatβs the source/version tea, bestie, bye! πβ¨
π¦ 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