termios: take non-default conversion functions to asm/termios-internal.h There are exactly two places where we include <asm/termios.h> - include/uapi/linux/termios.h and include/linux/termios-internal.h. The latter cares about the conversion functions; the former does not. So take them into asm/termios-internal.h and have linux/termios-internal.h include that in addition to asm/termios.h (conditional upon the config symbol selected by the both architectures where such non-default functions exist - alpha and sparc, that is). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/arch/Kconfig b/arch/Kconfig index f330410..c9e1387 100644 --- a/arch/Kconfig +++ b/arch/Kconfig
@@ -1416,6 +1416,9 @@ config HAVE_ARCH_NODE_DEV_GROUP bool +config ARCH_HAS_TERMIOS_INTERNAL + bool + source "kernel/gcov/Kconfig" source "scripts/gcc-plugins/Kconfig"
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 97fce73..4b9d294 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig
@@ -35,6 +35,7 @@ select MMU_GATHER_NO_RANGE select SPARSEMEM_EXTREME if SPARSEMEM select ZONE_DMA + select ARCH_HAS_TERMIOS_INTERNAL help The Alpha is a 64-bit general-purpose processor designed and marketed by the Digital Equipment Corporation of blessed memory,
diff --git a/arch/alpha/include/asm/termios.h b/arch/alpha/include/asm/termios-internal.h similarity index 98% rename from arch/alpha/include/asm/termios.h rename to arch/alpha/include/asm/termios-internal.h index ff64e75..c73cc96 100644 --- a/arch/alpha/include/asm/termios.h +++ b/arch/alpha/include/asm/termios-internal.h
@@ -2,8 +2,6 @@ #ifndef _ALPHA_TERMIOS_H #define _ALPHA_TERMIOS_H -#include <uapi/asm/termios.h> - /* * Translate a "termio" structure into a "termios". Ugh. */
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 1c852bb..9aaf980 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig
@@ -47,6 +47,7 @@ select NEED_DMA_MAP_STATE select NEED_SG_DMA_LENGTH select TRACE_IRQFLAGS_SUPPORT + select ARCH_HAS_TERMIOS_INTERNAL config SPARC32 def_bool !64BIT
diff --git a/arch/sparc/include/asm/termios.h b/arch/sparc/include/asm/termios-internal.h similarity index 98% rename from arch/sparc/include/asm/termios.h rename to arch/sparc/include/asm/termios-internal.h index 2ea23d3..9d14a4b 100644 --- a/arch/sparc/include/asm/termios.h +++ b/arch/sparc/include/asm/termios-internal.h
@@ -2,9 +2,6 @@ #ifndef _SPARC_TERMIOS_H #define _SPARC_TERMIOS_H -#include <uapi/asm/termios.h> - - /* * c_cc characters in the termio structure. Oh, how I love being * backwardly compatible. Notice that character 4 and 5 are
diff --git a/include/linux/termios_internal.h b/include/linux/termios_internal.h index 7c92d64..60e9a8e 100644 --- a/include/linux/termios_internal.h +++ b/include/linux/termios_internal.h
@@ -4,6 +4,9 @@ #include <linux/uaccess.h> #include <asm/termios.h> +#ifdef CONFIG_ARCH_HAS_TERMIOS_INTERNAL +#include <asm/termios-internal.h> +#endif /* intr=^C quit=^\ erase=del kill=^U eof=^D vtime=\0 vmin=\1 sxtc=\0