What is your locking for this versus a hangup ? - tty can go NULL ?
(use tty_port_tty_get/tty_kref_put)
cpu_relax() and needs a timeout ideally ?
If you don't support other CS values then also do
termios->c_flag &=~CSIZE;
termios->c_cflag |= CS8;
here.. so the app knows,
likewise if you don't support mark/space (CMSPAR) then clear the CMSPAR
bit
cpu_relax/timeout
ttyS is the 8250 style devices
These major/minors belong to an existing device - use new ones, or in
fact unless they must be fixed use dynamic ones.
If they need fixed ones then we probably want to assign four from the
range for small ports.
);
The world really doesn't need to know about each driver being loaded.
pr_debug() should be fine
Looks pretty good.
--