Re: Patch to sbpcd.c for modules

emoenke (emoenke@gwdg.de)
Mon, 23 Oct 1995 09:19:04 +0100 (MET)


Hi Glenn Moloney,

>Here is a really simple patch to sbpcd.c which I have been using for
>some time, so I can initialise the sbpcd module when I insmod
>it. ie. I can
> /sbin/insmod sbpcd.o sbpcd_ioaddr=0x300 sbpro_type=0
>
>--------------------8<---------------------------
>--- sbpcd.c.orig Mon Oct 23 12:33:12 1995
>+++ sbpcd.c Mon Oct 16 16:03:53 1995
>@@ -5124,9 +5124,9 @@
> msg(DBG_INF,"= = = = = = = = = = END of WARNING = = = = = == = = =\n");
> }
> #endif DISTRIBUTION
>+#endif MODULE
> sbpcd[0]=sbpcd_ioaddr; /* possibly changed by kernel command line */
> sbpcd[1]=sbpro_type; /* possibly changed by kernel command line */
>-#endif MODULE
>
> for (port_index=0;port_index<NUM_PROBE;port_index+=2)
> {
>--------------------8<---------------------------
>
>It would be great if this was in the standard kernel (Hint hint ;-).

This patch is simple in an other aspect, too: it achieves nothing which
can't be done without it (and it disturbs the current scheme).

The traditional way to give values during "insmod" is:
sbin/insmod sbpcd.o sbpcd=0x300,0
and the "traditional" element is: initializer name is the same as
module name.

Cheers -e

-- 
Eberhard Moenkeberg                                GGG   W   W  DDDD    GGG
                                                  G      W   W  D   D  G
E-Mail:   emoenke@gwdg.de                         G GGG  W   W  D   D  G GGG
Phone: +49 551 2011551  Fax: +49 551 21119        G   G  W W W  D   D  G   G
SnailMail:                                         GGG   WW WW  DDDD    GGG
Gesellschaft fuer wissenschaftliche Datenverarbeitung mbH
Am Fassberg, D-37077 Goettingen, GERMANY
At home: Email: Eberhard_Moenkeberg@rollo.fido.de (FIDO: 2:2437/210.27)
         Modem+ISDN ("guest") ++49-551-7704102, ISDN-HDLC 7704103