Skip to contentSkip to conversation

Move MODULE_ALIAS_LDISC to tty_ldisc.h

PATCH New Russell King 1 participant 1 message Sep 5, 2003 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move MODULE_ALIAS_LDISC to tty_ldisc.h

While trying to build bk-curr from yesterday, I encounter the following:

CC drivers/input/serio/serport.o
drivers/input/serio/serport.c:27: parse error before numeric constant drivers/input/serio/serport.c:27: warning: type defaults to int' in declaration of MODULE_ALIAS_LDISC' drivers/input/serio/serport.c:27: warning: function declaration isn't a prototype drivers/input/serio/serport.c:27: warning: data definition has no type or storage class

This seems to be defined in asm-i386/termios.h:

#define MODULE_ALIAS_LDISC(ldisc) \
MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))

Why is this defined in the per-architecture asm/ header files rather than the linux/ header files? It surely can't be something which is architecture specific.

Here's a patch which moves it to a more sensible location:

===== include/linux/tty_ldisc.h 1.3 vs edited =====

include/linux/tty_ldisc.h +3 -0
@@ -138,4 +138,7 @@
 
 #define LDISC_FLAG_DEFINED	0x00000001
 
+#define MODULE_ALIAS_LDISC(ldisc) \
+	MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))
+
 #endif /* _LINUX_TTY_LDISC_H */

===== include/asm-i386/termios.h 1.4 vs edited =====

include/asm-i386/termios.h +0 -2
@@ -102,8 +102,6 @@
 #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
 #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
 
-#define MODULE_ALIAS_LDISC(ldisc) \
-	MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))
 #endif	/* __KERNEL__ */
 
 #endif	/* _I386_TERMIOS_H */

===== include/asm-sparc/termios.h 1.6 vs edited =====

include/asm-sparc/termios.h +0 -3
@@ -169,9 +169,6 @@
 	0; \
 })
 
-#define MODULE_ALIAS_LDISC(ldisc) \
-	MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))
-
 #endif	/* __KERNEL__ */
 
 #endif /* _SPARC_TERMIOS_H */

===== include/asm-sparc64/termios.h 1.6 vs edited =====

include/asm-sparc64/termios.h +0 -3
@@ -168,9 +168,6 @@
 	0; \
 })
 
-#define MODULE_ALIAS_LDISC(ldisc) \
-	MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))
-
 #endif	/* __KERNEL__ */
 
 #endif /* _SPARC64_TERMIOS_H */
Signature · 5 lines
Russell King ([email protected])	http://www.arm.linux.org.uk/personal/
Maintainer of:
  2.6 ARM Linux   - http://www.arm.linux.org.uk/
  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
  2.6 Serial core