devm_rtc_device_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ devm_rtc_device_register(9) ✨

okay bestie, welcome to the Kernel API Manual β€” this one is about devm_rtc_device_register, and yes it’s giving β€œmanaged device” energy but also a lil deprecated, so buckle up πŸŽ€


🌸 NAME 🌸

devm_rtc_device_register β€” resource managed rtc_device_register()


πŸ¦‹ SYNOPSIS πŸ¦‹

struct rtc_device * devm_rtc_device_register (struct device *dev , const
char *name , const struct rtc_class_ops *ops , struct module *owner );

πŸ’… ARGUMENTS πŸ’…

  • dev β€” the device to register, like the main character here fr fr
  • name β€” the name of the device (unused) πŸ™ˆ yes bestie, it’s literally unused
  • ops β€” the rtc operations structure, the whole vibe of how this thing behaves
  • owner β€” the module owner, gotta give credit where it’s due πŸ‘‘

🫢 DESCRIPTION 🫢

return a struct rtc on success, or an ERR_PTR on error β€” no cap, that’s the deal ✨

Managed rtc_device_register. The rtc_device returned from this function are automatically freed on driver detach. So like, it cleans up after itself, which is honestly iconic πŸ’–

⚠️ bestie listen: This function is deprecated, use devm_rtc_allocate_device and rtc_register_device instead. like, please don’t make it awkward 😭

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/rtc/class.c β€” go read it, iykyk πŸ“–

and that’s the whole page, bestie πŸ’œ this gem comes from ./drivers/rtc, dated October 2026, and the page is literally devm_rtc_device_register(9) β€” slay, periodt 🌈✨

πŸ“¦ where this page comes from