__pci_hp_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __pci_hp_register(9) πŸ’–

okay bestie, welcome to the Kernel API Manual corner of the group chat β€” this one is literally about registering a hotplug_slot with the PCI hotplug subsystem, and yes it’s giving main character kernel energy ✨


🌸 NAME 🌸

__pci_hp_register β€” register a hotplug_slot with the PCI hotplug subsystem 🫢


✨ SYNOPSIS ✨

int __pci_hp_register (struct hotplug_slot *slot , struct pci_bus *bus , int devnr , const char *name , struct module *owner , const char *mod_name );

πŸŽ€ ARGUMENTS πŸŽ€

  • slot β€” pointer to the struct hotplug_slot to register πŸ’…
  • bus β€” bus this slot is on 🚌
  • devnr β€” device number πŸ”’
  • name β€” name registered with kobject core 🏷️
  • owner β€” caller module owner πŸ‘‘
  • mod_name β€” caller module name πŸ“›

πŸ¦‹ DESCRIPTION πŸ¦‹

So here’s the vibe: __pci_hp_register prepares a hotplug slot for in-kernel use and immediately publishes it to user space in one go. literally both steps, same breath, no cap 😭✨

Drivers may alternatively carry out the two steps separately by invoking pci_hp_initialize and pci_hp_add β€” iykyk, sometimes you want the split version 🧚

Return situation: 0 if successful, anything else for an error 🫑


πŸ”₯ SEE ALSO πŸ”₯


mwah πŸ’‹ β€” source/version: ./drivers/pci/hotplug; date: October 2026; page: __pci_hp_register(9). πŸ’œ

πŸ“¦ where this page comes from