tty_register_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

tty_register_device(9) β€” register a tty device. Okay so this is from the Kernel API Manual, and yes bestie, we’re about to make one individual tty device official. ✨


🌸 SYNOPSIS 🌸

struct device * tty_register_device (struct tty_driver *driver ,
unsigned index , struct device *device );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • driver β€” the tty driver that describes the tty device. This is the driver bestie, the one doing the describing.
  • index β€” the index in the tty driver for this tty device. It’s giving β€œwhich one in the lineup,” iykyk.
  • device β€” a struct device that is associated with this tty device. This field is optional; if there is no known struct device for this tty device, it can be set to NULL safely. No cap, NULL is allowed here. 🫢

πŸ”₯ DESCRIPTION πŸ”₯

This call is required to be made to register an individual tty device if the tty driver’s flags have the TTY_DRIVER_DYNAMIC_DEV bit set. If that bit is not set, this function should not be called by a tty driver. Like, put it down and back away slowly, that’s not your moment. πŸ’…

Locking: ??

Yes, the page literally says ?? for locking. That’s the whole vibe. Not me making it up, bestie. 😭

πŸ’œ RETURN πŸ’œ

A pointer to the struct device for this tty device β€” or ERR_PTR(-EFOO) on error. So you either get your cute little device pointer or the error-flavored one. Periodt.


🌈 SEE ALSO 🌈


Okay that’s the page, bestie β€” source/version ./drivers/tty, dated October 2026. Byeeee πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from