]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Input: uinput - add devname alias to allow module on-demand load
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 19 Aug 2010 16:52:28 +0000 (09:52 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 21 Aug 2010 07:37:40 +0000 (00:37 -0700)
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: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/misc/uinput.c
include/linux/miscdevice.h
include/linux/uinput.h

index bb53fd33cd1cb64e5d3c108b84eea4e1f11ccff4..0d4266a533a524564adcc85cc546736248753628 100644 (file)
@@ -811,6 +811,8 @@ static struct miscdevice uinput_misc = {
        .minor          = UINPUT_MINOR,
        .name           = UINPUT_NAME,
 };
+MODULE_ALIAS_MISCDEV(UINPUT_MINOR);
+MODULE_ALIAS("devname:" UINPUT_NAME);
 
 static int __init uinput_init(void)
 {
index bafffc737903971934037fc334f7d4158d9eda48..18fd13028ba1aab8207a1baa9c5b1527435d3a01 100644 (file)
@@ -33,6 +33,7 @@
 #define MWAVE_MINOR            219     /* ACP/Mwave Modem */
 #define MPT_MINOR              220
 #define MPT2SAS_MINOR          221
+#define UINPUT_MINOR           223
 #define HPET_MINOR             228
 #define FUSE_MINOR             229
 #define KVM_MINOR              232
index 60c81da77f0f36b94bde7d83562db55dfa707d92..05f7fed2b173eb8205b0754ee3a00de730215e8e 100644 (file)
@@ -37,7 +37,6 @@
 #define UINPUT_VERSION         3
 
 #ifdef __KERNEL__
-#define UINPUT_MINOR           223
 #define UINPUT_NAME            "uinput"
 #define UINPUT_BUFFER_SIZE     16
 #define UINPUT_NUM_REQUESTS    16