PNP: remove pnp_resource.index

We used pnp_resource.index to keep track of which ISAPNP configuration
register a resource should be written to.  We needed this only to
handle the case where a register is disabled but a subsequent register
in the same set is enabled.

Rather than explicitly maintaining the pnp_resource.index, this patch
adds a resource every time we read an ISAPNP configuration register
and marks the resource as IORESOURCE_DISABLED when appropriate.  This
makes the position in the pnp_resource_table always correspond to the
config register index.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
This commit is contained in:
Bjorn Helgaas
2008-06-27 16:56:53 -06:00
committed by Andi Kleen
parent b897f46cf7
commit 87e4acf3eb
4 changed files with 33 additions and 76 deletions

View File

@@ -57,7 +57,6 @@ struct pnp_resource *pnp_get_pnp_resource(struct pnp_dev *dev,
struct pnp_resource {
struct resource res;
unsigned int index; /* ISAPNP config register index */
};
struct pnp_resource_table {