mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] uinput: add devname alias to allow module on-demand load
@ 2010-08-19 12:58 Kay Sievers
  2010-09-17  9:53 ` Kay Sievers
  0 siblings, 1 reply; 5+ messages in thread
From: Kay Sievers @ 2010-08-19 12:58 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel

From: Kay Sievers <kay.sievers@vrfy.org>
Subject: 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>
---
 drivers/input/misc/uinput.c |    2 ++
 include/linux/miscdevice.h  |    1 +
 include/linux/uinput.h      |    1 -
 3 files changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -806,6 +806,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)
 {
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -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
--- a/include/linux/uinput.h
+++ b/include/linux/uinput.h
@@ -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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] uinput: add devname alias to allow module on-demand load
  2010-08-19 12:58 [PATCH] uinput: add devname alias to allow module on-demand load Kay Sievers
@ 2010-09-17  9:53 ` Kay Sievers
  2010-09-17 16:05   ` Dmitry Torokhov
  0 siblings, 1 reply; 5+ messages in thread
From: Kay Sievers @ 2010-09-17  9:53 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel

On Thu, Aug 19, 2010 at 14:58, Kay Sievers <kay.sievers@vrfy.org> wrote:
> From: Kay Sievers <kay.sievers@vrfy.org>
> Subject: 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.

Dmitry?

Kay

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] uinput: add devname alias to allow module on-demand load
  2010-09-17  9:53 ` Kay Sievers
@ 2010-09-17 16:05   ` Dmitry Torokhov
  2010-09-17 16:59     ` Kay Sievers
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2010-09-17 16:05 UTC (permalink / raw)
  To: Kay Sievers; +Cc: linux-kernel

On Fri, Sep 17, 2010 at 11:53:43AM +0200, Kay Sievers wrote:
> On Thu, Aug 19, 2010 at 14:58, Kay Sievers <kay.sievers@vrfy.org> wrote:
> > From: Kay Sievers <kay.sievers@vrfy.org>
> > Subject: 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.
> 
> Dmitry?
> 

[dtor@hammer work]$ git describe --contains 8905aaafb4b5d9764c5b4b54c7d03eb41bb0a7e9
v2.6.36-rc3~19^2~2

;)

-- 
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] uinput: add devname alias to allow module on-demand load
  2010-09-17 16:05   ` Dmitry Torokhov
@ 2010-09-17 16:59     ` Kay Sievers
  2010-09-19 23:27       ` Dmitry Torokhov
  0 siblings, 1 reply; 5+ messages in thread
From: Kay Sievers @ 2010-09-17 16:59 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel

On Fri, Sep 17, 2010 at 18:05, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Fri, Sep 17, 2010 at 11:53:43AM +0200, Kay Sievers wrote:
>> On Thu, Aug 19, 2010 at 14:58, Kay Sievers <kay.sievers@vrfy.org> wrote:
>> > From: Kay Sievers <kay.sievers@vrfy.org>
>> > Subject: 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.
>>
>> Dmitry?

> [dtor@hammer work]$ git describe --contains 8905aaafb4b5d9764c5b4b54c7d03eb41bb0a7e9
> v2.6.36-rc3~19^2~2

Awesome!
So much for stupidly waiting-for-reply instead of just checking the reality. :)

Thanks,
Kay

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] uinput: add devname alias to allow module on-demand load
  2010-09-17 16:59     ` Kay Sievers
@ 2010-09-19 23:27       ` Dmitry Torokhov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2010-09-19 23:27 UTC (permalink / raw)
  To: Kay Sievers; +Cc: linux-kernel

On Fri, Sep 17, 2010 at 06:59:24PM +0200, Kay Sievers wrote:
> On Fri, Sep 17, 2010 at 18:05, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > On Fri, Sep 17, 2010 at 11:53:43AM +0200, Kay Sievers wrote:
> >> On Thu, Aug 19, 2010 at 14:58, Kay Sievers <kay.sievers@vrfy.org> wrote:
> >> > From: Kay Sievers <kay.sievers@vrfy.org>
> >> > Subject: 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.
> >>
> >> Dmitry?
> 
> > [dtor@hammer work]$ git describe --contains 8905aaafb4b5d9764c5b4b54c7d03eb41bb0a7e9
> > v2.6.36-rc3~19^2~2
> 
> Awesome!
> So much for stupidly waiting-for-reply instead of just checking the reality. :)
> 

Well, my fault really. Normally I try to let people know when I accept a
patch but I neglected doing this in this case...

-- 
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-19 23:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-19 12:58 [PATCH] uinput: add devname alias to allow module on-demand load Kay Sievers
2010-09-17  9:53 ` Kay Sievers
2010-09-17 16:05   ` Dmitry Torokhov
2010-09-17 16:59     ` Kay Sievers
2010-09-19 23:27       ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®