Curious about tty_port_operations drop() callback.
While testing/debugging the tty driver I've changed to use the tty_port_* helper functions, I noticed there are two tty_port_operation fields that I'm not providing: destruct() and drop(). There's an example of destruct() usage in the hvc driver and a comment in tty.h explaining when it's called, so that's fairly obvious.
I haven't been able to figure out the purpose of the drop() callback. It's not used anywhere and there is no comment in tty.h hinting at its purpose.
Looking at tty_port_close() shows that drop() is called during close() of port with a reference count > 1. IOW, close() calls drop() in the cases where it isn't going to call shutdown().
There doesn't seem to be a corresponding "raise" callback during open() when activate() isn't going to be called, and I can't think of any use for either drop or raise...
Signature · 3 lines
Grant Edwards grant.b.edwards Yow! My mind is a potato
at field ...
gmail.com Quoted 10 lines · On Tue, 22 Jan 2013 16:38:54 +0000 (UTC) Grant Edwards…
While testing/debugging the tty driver I've changed to use the tty_port_* helper functions, I noticed there are two
tty_port_operationfields that I'm not providing:destruct()anddrop(). There's an example ofdestruct()usage in the hvc driver and a comment intty.hexplaining when it's called, so that's fairly obvious.I haven't been able to figure out the purpose of the
drop()callback. It's not used anywhere and there is no comment intty.hhinting at its purpose.
It may well no longer be needed. If so then I'm all for its removal.
Alan