提交 8905aaaf 编写于 作者: K Kay Sievers 提交者: Dmitry Torokhov

Input: uinput - add devname alias to allow module on-demand load

Recent modprobe and udev versions allow to create device nodes
for modules which are not loaded. Only the first access will cause
the in-kernel module loader to pull-in the module. Systems which
never access the device node will not needlessly load the module,
and no longer need init scripts or other facilities to unconditionally
load it.
Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 77edf0c7
...@@ -811,6 +811,8 @@ static struct miscdevice uinput_misc = { ...@@ -811,6 +811,8 @@ static struct miscdevice uinput_misc = {
.minor = UINPUT_MINOR, .minor = UINPUT_MINOR,
.name = UINPUT_NAME, .name = UINPUT_NAME,
}; };
MODULE_ALIAS_MISCDEV(UINPUT_MINOR);
MODULE_ALIAS("devname:" UINPUT_NAME);
static int __init uinput_init(void) static int __init uinput_init(void)
{ {
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#define MWAVE_MINOR 219 /* ACP/Mwave Modem */ #define MWAVE_MINOR 219 /* ACP/Mwave Modem */
#define MPT_MINOR 220 #define MPT_MINOR 220
#define MPT2SAS_MINOR 221 #define MPT2SAS_MINOR 221
#define UINPUT_MINOR 223
#define HPET_MINOR 228 #define HPET_MINOR 228
#define FUSE_MINOR 229 #define FUSE_MINOR 229
#define KVM_MINOR 232 #define KVM_MINOR 232
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#define UINPUT_VERSION 3 #define UINPUT_VERSION 3
#ifdef __KERNEL__ #ifdef __KERNEL__
#define UINPUT_MINOR 223
#define UINPUT_NAME "uinput" #define UINPUT_NAME "uinput"
#define UINPUT_BUFFER_SIZE 16 #define UINPUT_BUFFER_SIZE 16
#define UINPUT_NUM_REQUESTS 16 #define UINPUT_NUM_REQUESTS 16
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册