ttyprintk: Add TTY port shutdown callback
authorSamo Pogačnik <samo_pogacnik@t-2.net>
Tue, 27 Apr 2021 11:40:51 +0000 (13:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 16:29:12 +0000 (18:29 +0200)
commitbf3d6ab9bc1295fdf37cbc363ba9f7dfa14a84b8
tree852696c74aefee55c5dfabe1e3059049ea0b16ad
parent27dede097d2062252916c1c55ec0e04b027162b8
ttyprintk: Add TTY port shutdown callback

By adding the TTY port shutdown callback, the final buffer flush has
been moved from tpk_close() to tpk_port_shutdown(). This enables buffer
flush upon close and hangup as well. The change also removes the
specific 'buf == NULL' handling in tpk_printk(), which became useless.

Signed-off-by: Samo Pogačnik <samo_pogacnik@t-2.net>
Link: https://lore.kernel.org/r/f236ea26520fbef176fefec2e06a43548f63fa9c.camel@t-2.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/ttyprintk.c