[lkml]   [2001]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Linux-ATM-General] PATCH: linux-2.4.9/drivers/atm to new module_{init,exit} + some pci_device_id tables
>From: John Fraizer <atm@EnterZone.Net>
>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 \ / 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."
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:57    [W:0.027 / U:4.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site