* [KJ] Fwd: I noticed these
@ 2005-01-27 22:35 Randy.Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2005-01-27 22:35 UTC (permalink / raw)
To: kernel-janitors
anyone interested?
-------- Original Message --------
Could you look into, or forward to Kernel Janitor list.
1. Psmouse and input event drivers don't have module alias autoload
support.
I think it should be possible to do this similar to how
misc_device works.
2. /proc interface in /dev/rtc doesn't seem to have MODULE_OWNER ref
counting.
---
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [KJ] Fwd: I noticed these
@ 2005-02-01 1:00 Duncan Palmer
0 siblings, 0 replies; 2+ messages in thread
From: Duncan Palmer @ 2005-02-01 1:00 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 794 bytes --]
(sorry for not replying to the original post - I've just joined the list)
Randy Dunlap wrote:
> 1. Psmouse and input event drivers don't have module alias autoload
> support. I think it should be possible to do this similar to how
> misc_device works.
I've just been having a look at this, and have attached an example
patch (untested, and only partial) - does this look like the right
approach? The various input event drivers each use a range of minor
numbers, so if people think I'm doing the right thing so far, I'll
take these into account when I finish my changes.
2. /proc interface in /dev/rtc doesn't seem to have MODULE_OWNER ref
counting.
No idea about this. SET_MODULE_OWNER is defined to a no-op, and I
can't find any info as to its purpose. Can anyone enlighten me?
Dunk
[-- Attachment #2: diff --]
[-- Type: application/octet-stream, Size: 1798 bytes --]
diff -u linux-2.6.11-rc2-mm1.orig/include/linux/input.h linux-2.6.11-rc2-mm1/include/linux/input.h
--- linux-2.6.11-rc2-mm1.orig/include/linux/input.h 2005-01-28 13:01:08.000000000 +1100
+++ linux-2.6.11-rc2-mm1/include/linux/input.h 2005-02-01 11:32:40.000000000 +1100
@@ -1012,5 +1012,9 @@
extern struct class_simple *input_class;
+#define MODULE_ALIAS_INPUT(minorbase) \
+ MODULE_ALIAS("char-major-" __stringify(INPUT_MAJOR) "-" \
+ __stringify(minorbase))
+
#endif
#endif
diff -u linux-2.6.11-rc2-mm1.orig/drivers/input/input.c linux-2.6.11-rc2-mm1/drivers/input/input.c
--- linux-2.6.11-rc2-mm1.orig/drivers/input/input.c 2005-01-28 13:00:29.000000000 +1100
+++ linux-2.6.11-rc2-mm1/drivers/input/input.c 2005-02-01 11:40:44.000000000 +1100
@@ -536,8 +536,13 @@
struct file_operations *old_fops, *new_fops = NULL;
int err;
- /* No load-on-demand here? */
- if (!handler || !(new_fops = fops_get(handler->fops)))
+ if (!handler)
+ {
+ request_module("char-major-%d-%d", INPUT_MAJOR, iminor(inode));
+ /* The module will register itself upon loading */
+ handler = input_table[iminor(inode) >> 5];
+ }
+ if (!handler || !(new_fops = fops_get(handler->fops)))
return -ENODEV;
/*
diff -u linux-2.6.11-rc2-mm1.orig/drivers/input/mousedev.c linux-2.6.11-rc2-mm1/drivers/input/mousedev.c
--- linux-2.6.11-rc2-mm1.orig/drivers/input/mousedev.c 2005-01-28 13:00:30.000000000 +1100
+++ linux-2.6.11-rc2-mm1/drivers/input/mousedev.c 2005-02-01 11:32:53.000000000 +1100
@@ -32,6 +32,7 @@
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("Mouse (ExplorerPS/2) device interfaces");
MODULE_LICENSE("GPL");
+MODULE_ALIAS_INPUT(MOUSEDEV_MINOR_BASE);
#ifndef CONFIG_INPUT_MOUSEDEV_SCREEN_X
#define CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-01 1:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-27 22:35 [KJ] Fwd: I noticed these Randy.Dunlap
-- strict thread matches above, loose matches on Subject: below --
2005-02-01 1:00 Duncan Palmer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.