diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-06-27 18:56:53 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2008-07-16 17:27:05 -0400 |
commit | 87e4acf3ebc02c9d0a2f7a37b655c49176c4d765 (patch) | |
tree | 1d5ee98084c9de22d2de95dad84ae23a188f6429 /drivers/pnp/manager.c | |
parent | b897f46cf7941fff8130ccdaf85f39528bff6a51 (diff) |
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>
Diffstat (limited to 'drivers/pnp/manager.c')
-rw-r--r-- | drivers/pnp/manager.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index bea0914ff947..90bd9cb65563 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c | |||
@@ -40,7 +40,6 @@ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx) | |||
40 | } | 40 | } |
41 | 41 | ||
42 | /* set the initial values */ | 42 | /* set the initial values */ |
43 | pnp_res->index = idx; | ||
44 | res->flags |= rule->flags | IORESOURCE_IO; | 43 | res->flags |= rule->flags | IORESOURCE_IO; |
45 | res->flags &= ~IORESOURCE_UNSET; | 44 | res->flags &= ~IORESOURCE_UNSET; |
46 | 45 | ||
@@ -90,7 +89,6 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx) | |||
90 | } | 89 | } |
91 | 90 | ||
92 | /* set the initial values */ | 91 | /* set the initial values */ |
93 | pnp_res->index = idx; | ||
94 | res->flags |= rule->flags | IORESOURCE_MEM; | 92 | res->flags |= rule->flags | IORESOURCE_MEM; |
95 | res->flags &= ~IORESOURCE_UNSET; | 93 | res->flags &= ~IORESOURCE_UNSET; |
96 | 94 | ||
@@ -155,7 +153,6 @@ static int pnp_assign_irq(struct pnp_dev *dev, struct pnp_irq *rule, int idx) | |||
155 | } | 153 | } |
156 | 154 | ||
157 | /* set the initial values */ | 155 | /* set the initial values */ |
158 | pnp_res->index = idx; | ||
159 | res->flags |= rule->flags | IORESOURCE_IRQ; | 156 | res->flags |= rule->flags | IORESOURCE_IRQ; |
160 | res->flags &= ~IORESOURCE_UNSET; | 157 | res->flags &= ~IORESOURCE_UNSET; |
161 | 158 | ||
@@ -214,7 +211,6 @@ static void pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx) | |||
214 | } | 211 | } |
215 | 212 | ||
216 | /* set the initial values */ | 213 | /* set the initial values */ |
217 | pnp_res->index = idx; | ||
218 | res->flags |= rule->flags | IORESOURCE_DMA; | 214 | res->flags |= rule->flags | IORESOURCE_DMA; |
219 | res->flags &= ~IORESOURCE_UNSET; | 215 | res->flags &= ~IORESOURCE_UNSET; |
220 | 216 | ||