* [PATCH] More MODULE_ALIASes
@ 2003-12-15 0:47 Rusty Russell
2003-12-16 19:45 ` Jakub Bogusz
0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2003-12-15 0:47 UTC (permalink / raw)
To: torvalds, akpm; +Cc: linux-kernel
Three more MODULE_ALIASes. Trivial, but useful if people want things
to "just work" in 2.6.0.
If you drop this I'll just keep collecting them.
Cheers,
Rusty.
Name: Aliases for Character Devices
Author: Steve Youngs, Stephen Hemminger
Status: Trivial
D: Add more MODULE_ALIASes where required.
diff -urN -X dontdiff linux-2.6.0-test11/sound/core/sound.c linux-2.6.0-test11-sy/sound/core/sound.c
--- linux-2.6.0-test11/sound/core/sound.c 2003-11-27 11:02:48.000000000 +1000
+++ linux-2.6.0-test11-sy/sound/core/sound.c 2003-11-28 10:40:27.000000000 +1000
@@ -31,6 +31,7 @@
#include <sound/initval.h>
#include <linux/kmod.h>
#include <linux/devfs_fs_kernel.h>
+#include <linux/device.h>
#define SNDRV_OS_MINORS 256
@@ -52,6 +54,7 @@
MODULE_PARM(cards_limit, "i");
MODULE_PARM_DESC(cards_limit, "Count of soundcards installed in the system.");
MODULE_PARM_SYNTAX(cards_limit, "default:8,skill:advanced");
+MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR);
#ifdef CONFIG_DEVFS_FS
MODULE_PARM(device_mode, "i");
MODULE_PARM_DESC(device_mode, "Device file permission mask for devfs.");
diff -urN -X dontdiff linux-2.6.0-test11/sound/sound_core.c linux-2.6.0-test11-sy/sound/sound_core.c
--- linux-2.6.0-test11/sound/sound_core.c 2003-11-27 11:01:58.000000000 +1000
+++ linux-2.6.0-test11-sy/sound/sound_core.c 2003-11-28 10:39:46.000000000 +1000
@@ -45,6 +45,7 @@
#include <linux/major.h>
#include <linux/kmod.h>
#include <linux/devfs_fs_kernel.h>
+#include <linux/device.h>
#define SOUND_STEP 16
@@ -547,6 +548,7 @@
MODULE_DESCRIPTION("Core sound module");
MODULE_AUTHOR("Alan Cox");
MODULE_LICENSE("GPL");
+MODULE_ALIAS_CHARDEV_MAJOR(SOUND_MAJOR);
static void __exit cleanup_soundcore(void)
{
diff -Nru a/drivers/net/pppoe.c b/drivers/net/pppoe.c
--- a/drivers/net/pppoe.c Wed Dec 10 10:20:36 2003
+++ b/drivers/net/pppoe.c Wed Dec 10 10:20:36 2003
@@ -1151,3 +1151,4 @@
MODULE_AUTHOR("Michal Ostrowski <mostrows@speakeasy.net>");
MODULE_DESCRIPTION("PPP over Ethernet driver");
MODULE_LICENSE("GPL");
+MODULE_ALIAS_NETPROTO(PF_PPPOX);
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] More MODULE_ALIASes
2003-12-15 0:47 [PATCH] More MODULE_ALIASes Rusty Russell
@ 2003-12-16 19:45 ` Jakub Bogusz
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Bogusz @ 2003-12-16 19:45 UTC (permalink / raw)
To: linux-kernel
Rusty Russell wrote:
> Three more MODULE_ALIASes. Trivial, but useful if people want things
> to "just work" in 2.6.0.
>
> If you drop this I'll just keep collecting them.
BTW, I'm reminding about aliases mentioned by me few weeks ago
(here: http://www.ussg.iu.edu/hypermail/linux/kernel/0312.0/1263.html),
which could be built into appropriate modules (here in modprobe.conf
format):
alias ppp-compress-21 bsd_comp
alias ppp-compress-24 ppp_deflate
alias ppp-compress-26 ppp_deflate
alias iso9660 isofs
alias block-major-11 sr_mod
alias char-major-21-* sg
Also note that MODULE_ALIAS_BLOCKDEV_MAJOR doesn't work up to test11,
because for e.g. /dev/fd0 kernel calls modprobe with block-major-2 (in
drivers/block/genhd.c?), but MODULE_ALIAS_BLOCKDEV_MAJOR(FLOPPY_MAJOR)
adds "block-major-2-*" alias.
(similar problem with MODULE_ALIAS_CHARDEV_MAJOR was fixes few releases
ago by changing requet_module call in fs/chsr_dev.c - in 1.1414.1.23)
--
Jakub Bogusz http://cyber.cs.net.pl/~qboosh/
PLD Linux http://www.pld-linux.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-12-16 19:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-15 0:47 [PATCH] More MODULE_ALIASes Rusty Russell
2003-12-16 19:45 ` Jakub Bogusz
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).