of_device_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… of_device_alloc(9) πŸ’…

okay so we’re in the Kernel API Manual, section 9, and this page is all about of_device_alloc. The vibe? Allocate and initialize an of_device. iconic behavior, honestly. let’s get into it, bestie 🫢


✨ NAME ✨

of_device_alloc β€” allocate and initialize an of_device. no cap, that’s the whole name moment. πŸ’–


🌈 SYNOPSIS 🌈

here’s the signature, copied exactly because we do not play around with code:

struct platform_device * of_device_alloc (struct device_node *np , const char *bus_id , struct device *parent );

πŸŽ€ ARGUMENTS πŸŽ€

  • np β€” the device node to assign to the device. this is the node, bestie.
  • bus_id β€” the name to assign to the device. it may be null to use the default name. slay.
  • parent β€” the parent device. periodt. πŸ¦‹

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file is ./drivers/of/platform.c, and these are the related references β€” all names kept exactly, iykyk:


mwah πŸ’‹ this page lives under ./drivers/of, it’s stamped October 2026, and it answers to of_device_alloc(9). slay forever βœ¨πŸ‘‘

πŸ“¦ where this page comes from