diff options
author | Jiri Slaby <jslaby@suse.cz> | 2021-06-25 09:35:11 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-25 09:58:51 +0200 |
commit | 4834446035a1011ff1231626ef33555d64c4fd78 (patch) | |
tree | f721ac687b08ed69a87495aa04a44ffb76021384 /drivers/tty | |
parent | 5607fa6c3da3189de1bac356c73bc4fcaf4c0234 (diff) |
tty: make linux/tty_flip.h self-contained
If someone includes linux/tty_flip.h before linux/tty.h, they see
many compiler errors like:
include/linux/tty_flip.h:23:30: error: invalid use of undefined type 'struct tty_port'
include/linux/tty_flip.h:26:14: error: invalid use of undefined type 'struct tty_buffer'
tty_flip.h actually lexicographically sorts before tty.h. So if people
sort includes (as I tried in amiserial), the compilation suddenly
breaks.
Solve this by including linux/tty.h from linux/tty_flip.h, so that
everything is defined as needed.
Another alternative would be to uninline tty_insert_flip_char and just
insert forward declarations of tty_port and tty_buffer structs into
tty_flip.h as that inline is the only real user. But that would mean
slowing down the fast path without any good reason. (Provided the fix
is that easy and there were no real problems with this until now.)
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210625073511.4514-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
0 files changed, 0 insertions, 0 deletions