[v2,1/1] tty: Don't include tty_buffer.h in tty.h

Message ID 20240215111538.1920-1-ilpo.jarvinen@linux.intel.com
State New
Headers
Series [v2,1/1] tty: Don't include tty_buffer.h in tty.h |

Commit Message

Ilpo Järvinen Feb. 15, 2024, 11:15 a.m. UTC
  There's no need to include linux/tty_buffer.h in linux/tty.h.
Move the include into tty_buffer.c that is actually using it.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
v2:
- Fixed shortlog to make sense

 drivers/tty/tty_buffer.c | 1 +
 include/linux/tty.h      | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
  

Comments

Greg KH Feb. 17, 2024, 4:48 p.m. UTC | #1
On Thu, Feb 15, 2024 at 01:15:38PM +0200, Ilpo Järvinen wrote:
> There's no need to include linux/tty_buffer.h in linux/tty.h.
> Move the include into tty_buffer.c that is actually using it.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> v2:
> - Fixed shortlog to make sense

I didn't see a change in the shortlog, but hey, I trust you :)
  

Patch

diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index f8883afbeeba..79f0ff94ce00 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -7,6 +7,7 @@ 
 #include <linux/errno.h>
 #include <linux/minmax.h>
 #include <linux/tty.h>
+#include <linux/tty_buffer.h>
 #include <linux/tty_driver.h>
 #include <linux/tty_flip.h>
 #include <linux/timer.h>
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 8c76fd97d4ad..2b2e6f0a54d6 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -6,7 +6,6 @@ 
 #include <linux/major.h>
 #include <linux/termios.h>
 #include <linux/workqueue.h>
-#include <linux/tty_buffer.h>
 #include <linux/tty_driver.h>
 #include <linux/tty_ldisc.h>
 #include <linux/tty_port.h>