lkml.org 
[lkml]   [2001]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPCI like interface for ISAPnP

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/

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