tty: Move parts of tty_init_dev into new functions