PCI like interface for ISAPnP

Kai Germaschewski (kai@tp1.ruhr-uni-bochum.de)
Wed, 7 Nov 2001 00:40:05 +0100 (CET)


Hi!

I wrote a driver for some ISDN cards.

For the PCI cards, init is pretty easy:

static struct pci_driver fcpci_driver = {
name: "fcpci",
probe: fcpci_probe,
remove: fcpcipnp_remove,
id_table: fcpci_ids,
};

[...]

retval = pci_register_driver(&fcpci_driver);
if (retval < 0)
goto out;

As the driver also works with an ISAPnP card, I wanted to be able to
handle this part in the same way:

static struct isapnp_driver fcpnp_driver = {
name: "fcpnp",
probe: fcpnp_probe,
remove: fcpcipnp_remove,
id_table: fcpnp_ids,
};

[...]

retval = isapnp_register_driver(&fcpnp_driver);
if (retval < 0)
goto out_unregister_pci;

For the time being, I implemented isapnp_{,un}register_driver privately in
my driver, but I think this is functionality that other people may want to
use as well. Of course, within the new device framework in 2.5 will change
again, so this will most likely become obsolete then.

So the question is: Should I provide a generic isapnp_{,un}register_driver
framework (it's pretty simple anyway), or keep things private to my
driver?

--Kai

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/