linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Input layer demand loading
@ 2003-07-16 18:19 Andrey Borzenkov
  2003-07-16 18:29 ` Oliver Neukum
  2003-07-16 18:33 ` Mike Fedyk
  0 siblings, 2 replies; 17+ messages in thread
From: Andrey Borzenkov @ 2003-07-16 18:19 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel

>> True, but then if you try to open the port, you will only get the base
>> joydev.o module loaded, not the gameport driver, which is what you
>> _really_ want to have loaded, right?
>> 
>> So there really isn't much benifit to doing this, sorry.
>
> Why? It could work the way PCMCIA SCSI works.
> Cardmgr loads the LLDD, but sd, sg, etc. are loaded
> on demand.

how? SCSI (or USB, PCI, EISA etc) have driver-independent means to identify 
device or at least device class.

But how are you going you going to know you need to load specific mouse driver 
(logitech not microsoft) or specific joystick flavour? All that you possibly 
know that you have _some_ mouse or _some_ joystick ...

-andrey

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Input layer demand loading
@ 2003-07-13 16:39 Fredrik Tolf
  2003-07-14  6:22 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Fredrik Tolf @ 2003-07-13 16:39 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 110 bytes --]

Why does the input layer still not have on-demand module loading? How about 
applying this?

Fredrik Tolf

[-- Attachment #2: Patch for 2.5.75 --]
[-- Type: text/x-diff, Size: 725 bytes --]

cd /usr/src/linux-2.5.75/drivers/input/
diff -up /usr/src/linux-2.5.75/drivers/input/input.c\~ /usr/src/linux-2.5.75/drivers/input/input.c
--- /usr/src/linux-2.5.75/drivers/input/input.c~	2003-07-13 18:34:09.000000000 +0200
+++ /usr/src/linux-2.5.75/drivers/input/input.c	2003-07-13 18:34:18.000000000 +0200
@@ -531,7 +531,13 @@ static int input_open_file(struct inode 
 	struct file_operations *old_fops, *new_fops = NULL;
 	int err;
 
-	/* No load-on-demand here? */
+	if(!handler)
+	{
+		char name[20];
+		sprintf(name, "input-dev-%i", minor(inode->i_rdev) >> 5);
+		request_module(name);
+		handler = input_table[minor(inode->i_rdev) >> 5];
+	}
 	if (!handler || !(new_fops = fops_get(handler->fops)))
 		return -ENODEV;

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

end of thread, other threads:[~2003-07-17 18:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-16 18:19 Input layer demand loading Andrey Borzenkov
2003-07-16 18:29 ` Oliver Neukum
2003-07-16 18:33 ` Mike Fedyk
     [not found]   ` <E19d16P-00044X-00.arvidjaar-mail-ru@f19.mail.ru>
2003-07-17 18:38     ` Re[2]: " Mike Fedyk
  -- strict thread matches above, loose matches on Subject: below --
2003-07-13 16:39 Fredrik Tolf
2003-07-14  6:22 ` Greg KH
2003-07-14 10:58   ` Fredrik Tolf
2003-07-16  4:29     ` Greg KH
2003-07-16 12:57       ` Fredrik Tolf
2003-07-16 16:26         ` Greg KH
2003-07-16 16:56           ` Måns Rullgård
2003-07-16 17:28           ` Oliver Neukum
2003-07-16 21:23           ` Fredrik Tolf
2003-07-16 21:54             ` Greg KH
2003-07-16 22:07               ` Oliver Neukum
2003-07-16 22:16                 ` Greg KH
2003-07-16 22:21               ` Fredrik Tolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).