lkml.org 
[lkml]   [2003]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectInput layer demand loading
Date
Why does the input layer still not have on-demand module loading? How about 
applying this?

Fredrik Tolf
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;
\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.035 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site