of_reserved...init_by_name(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… of_reserved...init_by_name(9) β€” Kernel API Manual, section 9 πŸŽ€

okay so bestie, we're in the kernel API manual (section 9, the grown-up one) and today's main character is of_reserved_mem_device_init_by_name ✨ ngl the name is a whole sentence but she ate, we move.


✨ NAME ✨

of_reserved_mem_device_init_by_name β€” assign a named reserved memory region to a given device 🫢 like, you picked the region by name, and now it belongs to your device, periodt.


🌸 SYNOPSIS 🌸

int of_reserved_mem_device_init_by_name (struct device *dev , struct device_node *np , const char *name );

look at her. three args, one int, zero drama πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • dev β€” pointer to the device you're configuring πŸ’… this is the one getting the memory region, she's the main character here
  • np β€” pointer to the device node with the 'memory-region' property 🌈 (yes that's the exact property name, keep it exactly like that, iykyk)
  • name β€” the name of the selected memory region πŸŽ€ the "by name" part of the whole situation, bestie

πŸ¦‹ RETURN πŸ¦‹

0 on success πŸŽ‰ or a negative error-code on failure 😭 (yes negative, it's giving "return of the negative error-code", that's just how kernel does)

heads up bestie: negative means something went wrong. don't treat it as true/false, fr fr, check the sign πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file:

  • ./drivers/of/of_reserved_mem.c β€” the source, go read her, she's iconic 🧚

and the whole friend group:


πŸ’€ reminder to my girlies: these are pointers, so dev, np and name better be real. no cap, no guessing, no NULL shenanigans πŸ™ˆ

o wait and one last thing β€” this page lives at ./drivers/of, datestamped October 2026, so if you're reading this from the future: hi bestie, slay, you're doing amazing πŸ’œ πŸ¦‹ 🌸 and that's the whole vibe check, mwah 🫢✨

πŸ“¦ where this page comes from