Commit 6cea4e9e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] MODULE_ALIAS for tty ldisc

From: Rusty Russell <rusty@rustcorp.com.au>

Rather than hardcoded names in modprobe, modules can offer their own
aliases (which can be overridden by the config file).

Here are the tty-ldisc ones.
parent 80e01029
...@@ -574,3 +574,4 @@ module_exit(hci_uart_cleanup); ...@@ -574,3 +574,4 @@ module_exit(hci_uart_cleanup);
MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>"); MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION); MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_LDISC(N_HCI);
...@@ -982,3 +982,4 @@ MODULE_LICENSE("GPL"); ...@@ -982,3 +982,4 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Paul Fulghum paulkf@microgate.com"); MODULE_AUTHOR("Paul Fulghum paulkf@microgate.com");
MODULE_PARM(debuglevel, "i"); MODULE_PARM(debuglevel, "i");
MODULE_PARM(maxframe, "i"); MODULE_PARM(maxframe, "i");
MODULE_ALIAS_LDISC(N_HDLC);
...@@ -1428,4 +1428,4 @@ static int r3964_receive_room(struct tty_struct *tty) ...@@ -1428,4 +1428,4 @@ static int r3964_receive_room(struct tty_struct *tty)
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_LDISC(N_R3964);
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("Input device TTY line discipline"); MODULE_DESCRIPTION("Input device TTY line discipline");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_LDISC(N_MOUSE);
#define SERPORT_BUSY 1 #define SERPORT_BUSY 1
......
...@@ -1064,6 +1064,7 @@ static void decode_data(unsigned char inbyte, struct sixpack *sp) ...@@ -1064,6 +1064,7 @@ static void decode_data(unsigned char inbyte, struct sixpack *sp)
MODULE_AUTHOR("Andreas Knsgen <ajk@ccac.rwth-aachen.de>"); MODULE_AUTHOR("Andreas Knsgen <ajk@ccac.rwth-aachen.de>");
MODULE_DESCRIPTION("6pack driver for AX.25"); MODULE_DESCRIPTION("6pack driver for AX.25");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_LDISC(N_6PACK);
module_init(sixpack_init_driver); module_init(sixpack_init_driver);
module_exit(sixpack_exit_driver); module_exit(sixpack_exit_driver);
...@@ -935,7 +935,7 @@ MODULE_DESCRIPTION("KISS driver for AX.25 over TTYs"); ...@@ -935,7 +935,7 @@ MODULE_DESCRIPTION("KISS driver for AX.25 over TTYs");
MODULE_PARM(ax25_maxdev, "i"); MODULE_PARM(ax25_maxdev, "i");
MODULE_PARM_DESC(ax25_maxdev, "number of MKISS devices"); MODULE_PARM_DESC(ax25_maxdev, "number of MKISS devices");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_LDISC(N_AX25);
module_init(mkiss_init_driver); module_init(mkiss_init_driver);
module_exit(mkiss_exit_driver); module_exit(mkiss_exit_driver);
...@@ -651,5 +651,6 @@ module_exit(irtty_sir_cleanup); ...@@ -651,5 +651,6 @@ module_exit(irtty_sir_cleanup);
MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>"); MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>");
MODULE_DESCRIPTION("IrDA TTY device driver"); MODULE_DESCRIPTION("IrDA TTY device driver");
MODULE_ALIAS_LDISC(N_IRDA);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -84,7 +84,7 @@ static int flag_time = HZ; ...@@ -84,7 +84,7 @@ static int flag_time = HZ;
MODULE_PARM(flag_time, "i"); MODULE_PARM(flag_time, "i");
MODULE_PARM_DESC(flag_time, "ppp_async: interval between flagged packets (in clock ticks)"); MODULE_PARM_DESC(flag_time, "ppp_async: interval between flagged packets (in clock ticks)");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_LDISC(N_PPP);
/* /*
* Prototypes. * Prototypes.
......
...@@ -759,3 +759,4 @@ ppp_sync_cleanup(void) ...@@ -759,3 +759,4 @@ ppp_sync_cleanup(void)
module_init(ppp_sync_init); module_init(ppp_sync_init);
module_exit(ppp_sync_cleanup); module_exit(ppp_sync_cleanup);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_LDISC(N_SYNC_PPP);
...@@ -1513,3 +1513,4 @@ static void sl_keepalive(unsigned long sls) ...@@ -1513,3 +1513,4 @@ static void sl_keepalive(unsigned long sls)
#endif #endif
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_LDISC(N_SLIP);
...@@ -58,6 +58,7 @@ struct termio { ...@@ -58,6 +58,7 @@ struct termio {
#define N_HCI 15 /* Bluetooth HCI UART */ #define N_HCI 15 /* Bluetooth HCI UART */
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/module.h>
/* intr=^C quit=^\ erase=del kill=^U /* intr=^C quit=^\ erase=del kill=^U
eof=^D vtime=\0 vmin=\1 sxtc=\0 eof=^D vtime=\0 vmin=\1 sxtc=\0
...@@ -101,6 +102,8 @@ struct termio { ...@@ -101,6 +102,8 @@ struct termio {
#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) #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 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 /* __KERNEL__ */
#endif /* _I386_TERMIOS_H */ #endif /* _I386_TERMIOS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment