Question: initdata for modules....

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Sun, 20 Dec 1998 13:58:17 +0100 (MET)


Hi everyone,

I've written a driver for an intelligent multiport serial card.
I've got the firmware for the card in a separate file.

For "inside" the kernel, I should declare the firmware initdata and
it will get freed after booting.

For the module, I could link everything together (that's what I'm
doing right now), but this means I'm wasting a few tens of kilobytes
of unswappable kernel memory just for the firmware.

What I'd like to do is to have the "firmware" as a separate module
that can be unloaded after initializing the main driver.

The drawback is that the usage count of the firmware module will stick
at "1" if my main module is loaded. Can I decrease its usage count
"by hand" to allow it to unload once I'm done with it?

Anybody have any good tips about this?

For your information, take a look at the object files:

Two firmware objects:

-rw-r--r-- 1 wolff users 9324 Dec 19 17:08 si2_z280.o
-rw-r--r-- 1 wolff users 20368 Dec 14 12:45 si3_t225.o

and the two "code" objects:

-rw-r--r-- 1 wolff users 7588 Dec 17 16:38 generic_serial.o
-rw-r--r-- 1 wolff users 22860 Dec 20 09:49 sx.o

For the module, I'll make the main module (sx.o) depend on the
"generic_serial" module.

If you have a Specialix SI/XIO or SX card, feel free to contact me to
help beta-testing this driver. (sorry, no free cards this time: those
have been given away already).

(If you have an SI card, you might have been using Simon Allens
driver. This is a completely new driver, and supports a few new
features. (e.g. several cards in one computer))

The new driver supports SX/ISA, SX/PCI and SI/ISA. Officially, the
SI/EISA and SI/PCI won't be supported. If someone with one of those
cards volunteers, it shouldn't be too hard to add support for them.
No guarantees though.....

Regards,

Roger Wolff.

Tomorrow: Only 9000 hours to Y2k

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
*   Never blow in a cat's ear because if you do, usually after three or  *
*   four times, they will bite your lips!  And they don't let go for at  *
*   least a minute. -- Lisa Coburn, age 9

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/