Re: Allowing WAN card driver to be built-in to the kernel

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 17 Nov 1999 23:25:51 +0000 (GMT)


> static struct device cpc1_dev =
> {"cpc1", 0, 0, 0, 0, 0, 0, 0, 0, 0, &cpc2_dev, NULL};

You don't need these

> static struct device cpc0_dev =
> {"cpc0", 0, 0, 0, 0, 0, 0, 0, 0, 0, &cpc1_dev, cpc_probe};

Cal it something like "cpc_init"

> Note that the Space.c declaration is just a hook, as the 'struct device'
> parameter is ignored by cpc_probe. Note also that the only the first
> device invokes cpc_probe, which detects all devices.

Nod.

> The problem is that as this is not a pointer, it can't be the same
> structure as the one defined in Space.c (or can it??) and, thus, I don't
> have how to tell the driver (and syncppp) to use the structure defined in
> Space.c. If I use the Space.c definition in the driver, it will not be in
> sync with the ppp_device structure, and that will surely cause problems.

You dont want to use the structure in Space.c. Throw it away. For pci
devices its actually just a legacy mess. Return a failure in the probe
routine after allocating your new drivers

-
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/