Skip to contentSkip to conversation

PATCH: linux-2.4.9/drivers/atm to new module_{init,exit} + some pci_device_id tables

Linux-ATM-General Adam J. Richter 1 participant 1 message Aug 21, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines

From: John Fraizer <[email protected]>
Just a quick question. Please be gentl. I'm not a kernel hack. I just want to make sure that it will still be possible to build a monolythic kernel with ATM support. If not, that is a BAD thing.

Yes, you still can. module_{init,exit} are defined in
the monolithic case to add the initialization routine to a list of initializers that the kernel calls in do_initcalls
(in linux/init/main.c), and to compile the module_exit call into nothing. This way, you can have a driver that is written like a module but actually supports both the modular and monolithic cases without need for #ifdef's and different code for the two cases. That is the primary point of the module_{init,exit} scheme.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
[email protected]     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America

fax +1 408 261-6631 "Free Software For The Rest Of Us."