__auxiliary_device_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

__auxiliary_device_add β€” add an auxiliary bus device. Welcome to the Kernel API Manual page for it, bestie 🫢✨


✨ SYNOPSIS ✨

int __auxiliary_device_add (struct auxiliary_device *auxdev , const char
       *modname );

🫢 ARGUMENTS 🫢

  • auxdev β€” the auxiliary bus device you're adding to the bus πŸ’…
  • modname β€” the name of the parent device's driver module 🌟

πŸ’… DESCRIPTION πŸ’…

Okay so this is the third step in the three-step process to register an auxiliary_device. Main character energy only ✨

This function must be called after a successful call to auxiliary_device_init, which is the one that performs the device_initialize. So if this returns an error code, you have to call auxiliary_device_uninit so that the .release callback gets triggered to free the memory associated with the auxiliary_device 😭

Bestie, do not skip the cleanup. If __auxiliary_device_add hands you an error code, that auxiliary_device_uninit call is not optional β€” it's giving necessary, no cap πŸ’€

The expectation is that users will call the "auxiliary_device_add" macro, so that the caller's KBUILD_MODNAME is automatically inserted for the modname parameter πŸŽ€ Only if a user requires a custom name would this version be called directly πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€


Big kiss from the ./drivers/base directory, dated October 2026, on the __auxiliary_device_add(9) page β€” slay and stay safe out there πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from