* Re: [Linux-ATM-General] PATCH: linux-2.4.9/drivers/atm to new module_{init,exit} + some pci_device_id tables
@ 2001-08-21 2:30 Adam J. Richter
0 siblings, 0 replies; 2+ messages in thread
From: Adam J. Richter @ 2001-08-21 2:30 UTC (permalink / raw)
To: atm; +Cc: linux-atm-general, linux-kernel
>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
adam@yggdrasil.com \ / 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."
^ permalink raw reply [flat|nested] 2+ messages in thread* PATCH: linux-2.4.9/drivers/atm to new module_{init,exit} + some pci_device_id tables
@ 2001-08-20 14:58 Adam J. Richter
2001-08-21 1:21 ` [Linux-ATM-General] " John Fraizer
0 siblings, 1 reply; 2+ messages in thread
From: Adam J. Richter @ 2001-08-20 14:58 UTC (permalink / raw)
To: linux-atm-general; +Cc: linux-kernel
The following patch moves linux-2.4.9/drivers/atm
to the relatively new module_{init,exit} interface, simplifying
the code and removing the reference to the ATM drivers from
linux/drivers/genhd.c (this is partly motivated by my effort to get
rid of genhd.c). The changes also include some pci_device_id tables,
which enable automatic loading of the modules via pcimodules (or
a similar program). These changes are also all steps toward porting
the atm drivers to the new PCI interface. In the case zatm.c, I
have actually ported it to the new PCI interface, although it
shares the stock zatm driver's deficiency of not supporting
module removal.
Note that this change deletes linux-2.4.9/drivers/atmdev_init.c,
since the conversion to module_{init,exit} completely obseletes that file.
If these changes look OK, I would like to get them
into the stock kernel. If there is a maintainer on linux-atm-general
who shepherds these patches to Alan and Linus, and if these changes
are good, please let me know if you are going to "officially" send them
to Alan and Linus or if you want me to do so or if there is some other
procedure that I should follow.
--
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com \ / 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."
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Linux-ATM-General] PATCH: linux-2.4.9/drivers/atm to new module_{init,exit} + some pci_device_id tables
2001-08-20 14:58 Adam J. Richter
@ 2001-08-21 1:21 ` John Fraizer
0 siblings, 0 replies; 2+ messages in thread
From: John Fraizer @ 2001-08-21 1:21 UTC (permalink / raw)
To: Adam J. Richter; +Cc: linux-atm-general, linux-kernel
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.
On Mon, 20 Aug 2001, Adam J. Richter wrote:
> The following patch moves linux-2.4.9/drivers/atm
> to the relatively new module_{init,exit} interface, simplifying
> the code and removing the reference to the ATM drivers from
> linux/drivers/genhd.c (this is partly motivated by my effort to get
> rid of genhd.c). The changes also include some pci_device_id tables,
> which enable automatic loading of the modules via pcimodules (or
> a similar program). These changes are also all steps toward porting
> the atm drivers to the new PCI interface. In the case zatm.c, I
> have actually ported it to the new PCI interface, although it
> shares the stock zatm driver's deficiency of not supporting
> module removal.
>
> Note that this change deletes linux-2.4.9/drivers/atmdev_init.c,
> since the conversion to module_{init,exit} completely obseletes that file.
>
> If these changes look OK, I would like to get them
> into the stock kernel. If there is a maintainer on linux-atm-general
> who shepherds these patches to Alan and Linus, and if these changes
> are good, please let me know if you are going to "officially" send them
> to Alan and Linus or if you want me to do so or if there is some other
> procedure that I should follow.
>
> --
> Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
> adam@yggdrasil.com \ / 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."
>
> _______________________________________________
> Linux-atm-general mailing list
> Linux-atm-general@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/linux-atm-general
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-08-21 2:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-21 2:30 [Linux-ATM-General] PATCH: linux-2.4.9/drivers/atm to new module_{init,exit} + some pci_device_id tables Adam J. Richter
-- strict thread matches above, loose matches on Subject: below --
2001-08-20 14:58 Adam J. Richter
2001-08-21 1:21 ` [Linux-ATM-General] " John Fraizer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®