linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fredrik Tolf <fredrik@dolda2000.cjb.net>
To: linux-kernel@vger.kernel.org
Subject: Input layer demand loading
Date: Sun, 13 Jul 2003 18:39:49 +0200	[thread overview]
Message-ID: <200307131839.49112.fredrik@dolda2000.cjb.net> (raw)

[-- 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;

             reply	other threads:[~2003-07-13 16:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-13 16:39 Fredrik Tolf [this message]
2003-07-14  6:22 ` Input layer demand loading 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
2003-07-16 18:19 Andrey Borzenkov
2003-07-16 18:29 ` Oliver Neukum
2003-07-16 18:33 ` Mike Fedyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200307131839.49112.fredrik@dolda2000.cjb.net \
    --to=fredrik@dolda2000.cjb.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).