Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

Kay Sievers and committed by
Dmitry Torokhov
8905aaaf 77edf0c7

+3 -1
+2
drivers/input/misc/uinput.c
··· 811 811 .minor = UINPUT_MINOR, 812 812 .name = UINPUT_NAME, 813 813 }; 814 + MODULE_ALIAS_MISCDEV(UINPUT_MINOR); 815 + MODULE_ALIAS("devname:" UINPUT_NAME); 814 816 815 817 static int __init uinput_init(void) 816 818 {
+1
include/linux/miscdevice.h
··· 33 33 #define MWAVE_MINOR 219 /* ACP/Mwave Modem */ 34 34 #define MPT_MINOR 220 35 35 #define MPT2SAS_MINOR 221 36 + #define UINPUT_MINOR 223 36 37 #define HPET_MINOR 228 37 38 #define FUSE_MINOR 229 38 39 #define KVM_MINOR 232
-1
include/linux/uinput.h
··· 37 37 #define UINPUT_VERSION 3 38 38 39 39 #ifdef __KERNEL__ 40 - #define UINPUT_MINOR 223 41 40 #define UINPUT_NAME "uinput" 42 41 #define UINPUT_BUFFER_SIZE 16 43 42 #define UINPUT_NUM_REQUESTS 16