_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 _register(9) β€” the Kernel API Manual glow-up 🌸

okay so bestie, welcome to the _register(9) page from the Kernel API Manual πŸ’– this one is all about registering a struct omap_hwmod, and honestly it's giving "small function, big feelings" energy. let's get into it ✨


πŸŽ€ NAME πŸŽ€

_register β€” registers a struct omap_hwmod. that's it, that's the whole job, and she does it πŸ’…


✨ SYNOPSIS ✨

int _register (struct omap_hwmod *oh );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • oh β€” a struct omap_hwmod *. yes, that's the entire description, the manpage really just said "figure it out" 😭 it's the hwmod you're registering, bestie.

πŸ’œ DESCRIPTION πŸ’œ

so _register registers the omap_hwmod oh. that's the vibe πŸ‘‘

but bestie, she's picky, and she returns things. here's the full vibe check:

  • -EEXIST if an omap_hwmod has already been registered by the same name (name already taken, sorry babe πŸ’€)
  • -EINVAL if any of these are true:
    • the omap_hwmod is in the wrong state
    • oh is NULL
    • the omap_hwmod's class field is NULL
    • the omap_hwmod is missing a name
    • the omap_hwmod's class is missing a name
  • 0 upon success πŸŽ‰ slay

πŸ™ˆ the XXX note (yes it really says XXX) πŸ™ˆ

XXX The data should be copied into bootmem, so the original data should be marked __initdata and freed after init. this would allow unneeded omap_hwmods to be freed on multi-OMAP configurations. ngl that sounds iconic and also like a lot of work 😭

heads up: the copy process would be relatively complex due to the large number of substructures. so like... not a five-minute patch, bestie. 🫢

🌈 SEE ALSO 🌈

Kernel file ./arch/arm/mach-omap2/omap_hwmod.c β€” and honestly the whole friend group is tagged below, they all showed up to the group chat πŸ’–

like I said. whole friend group. πŸ˜­πŸ’–


and that's the page, bestie!! go register some hwmods responsibly ✨ this cutie lives in the source tree at ./arch/arm/mach-omap2, and the version/date stamp on her is October 2026 πŸŽ€ mwah, ily, rtfm again soon πŸ«ΆπŸ’…

πŸ“¦ where this page comes from