Arnaldo Carvalho de Melo wrote:
> Here is the excerpt:
>
> /* We should have a "dev" from Space.c or the static module table. */
> if (dev == NULL) {
> printk("ac3200.c: Passed a NULL device.\n");
> dev = init_etherdev(0, 0);
>
> if (!dev)
> return -ENOMEM;
> }
>
> there are other drivers with this kind of code, being paranoid? I think that
> we
> may well do this:
>
> if (dev == NULL)
> panic();
Agreed. It looks like that is debugging code that wound up being
propagated to a few drivers. For the modular case, the driver includes
its own net_device(s), which are passed to the probe/init routine. For
the non-modular case, one of the entries in the Space.c device table are
passed to the probe/init routine.
The older net drivers initialization could be made a lot smarter, and
smaller, actually...
Jeff
--
Jeff Garzik |
Building 1024 | Andre the Giant has a posse.
MandrakeSoft, Inc. |
|