diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-04-28 18:34:30 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-29 03:22:27 -0400 |
commit | 784f01d5bdeae7d7005ede17305306b042ba2617 (patch) | |
tree | 5723e4bde087657b86bda865ac249b42a5c6a9cf /drivers/pnp/manager.c | |
parent | 06cb58a6eb0b689f95a6c055cfc400fd30c500c6 (diff) |
PNP: add struct pnp_resource
This patch adds a "struct pnp_resource". This currently
contains only a struct resource, but we will soon need
additional PNP-specific information.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/manager.c')
-rw-r--r-- | drivers/pnp/manager.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index 46a5e0e90d9a..4823da27e640 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c | |||
@@ -247,22 +247,22 @@ void pnp_init_resources(struct pnp_dev *dev) | |||
247 | int idx; | 247 | int idx; |
248 | 248 | ||
249 | for (idx = 0; idx < PNP_MAX_IRQ; idx++) { | 249 | for (idx = 0; idx < PNP_MAX_IRQ; idx++) { |
250 | res = &dev->res->irq_resource[idx]; | 250 | res = &dev->res->irq[idx].res; |
251 | res->flags = IORESOURCE_IRQ; | 251 | res->flags = IORESOURCE_IRQ; |
252 | pnp_init_resource(res); | 252 | pnp_init_resource(res); |
253 | } | 253 | } |
254 | for (idx = 0; idx < PNP_MAX_DMA; idx++) { | 254 | for (idx = 0; idx < PNP_MAX_DMA; idx++) { |
255 | res = &dev->res->dma_resource[idx]; | 255 | res = &dev->res->dma[idx].res; |
256 | res->flags = IORESOURCE_DMA; | 256 | res->flags = IORESOURCE_DMA; |
257 | pnp_init_resource(res); | 257 | pnp_init_resource(res); |
258 | } | 258 | } |
259 | for (idx = 0; idx < PNP_MAX_PORT; idx++) { | 259 | for (idx = 0; idx < PNP_MAX_PORT; idx++) { |
260 | res = &dev->res->port_resource[idx]; | 260 | res = &dev->res->port[idx].res; |
261 | res->flags = IORESOURCE_IO; | 261 | res->flags = IORESOURCE_IO; |
262 | pnp_init_resource(res); | 262 | pnp_init_resource(res); |
263 | } | 263 | } |
264 | for (idx = 0; idx < PNP_MAX_MEM; idx++) { | 264 | for (idx = 0; idx < PNP_MAX_MEM; idx++) { |
265 | res = &dev->res->mem_resource[idx]; | 265 | res = &dev->res->mem[idx].res; |
266 | res->flags = IORESOURCE_MEM; | 266 | res->flags = IORESOURCE_MEM; |
267 | pnp_init_resource(res); | 267 | pnp_init_resource(res); |
268 | } | 268 | } |
@@ -278,28 +278,28 @@ static void pnp_clean_resource_table(struct pnp_dev *dev) | |||
278 | int idx; | 278 | int idx; |
279 | 279 | ||
280 | for (idx = 0; idx < PNP_MAX_IRQ; idx++) { | 280 | for (idx = 0; idx < PNP_MAX_IRQ; idx++) { |
281 | res = &dev->res->irq_resource[idx]; | 281 | res = &dev->res->irq[idx].res; |
282 | if (res->flags & IORESOURCE_AUTO) { | 282 | if (res->flags & IORESOURCE_AUTO) { |
283 | res->flags = IORESOURCE_IRQ; | 283 | res->flags = IORESOURCE_IRQ; |
284 | pnp_init_resource(res); | 284 | pnp_init_resource(res); |
285 | } | 285 | } |
286 | } | 286 | } |
287 | for (idx = 0; idx < PNP_MAX_DMA; idx++) { | 287 | for (idx = 0; idx < PNP_MAX_DMA; idx++) { |
288 | res = &dev->res->dma_resource[idx]; | 288 | res = &dev->res->dma[idx].res; |
289 | if (res->flags & IORESOURCE_AUTO) { | 289 | if (res->flags & IORESOURCE_AUTO) { |
290 | res->flags = IORESOURCE_DMA; | 290 | res->flags = IORESOURCE_DMA; |
291 | pnp_init_resource(res); | 291 | pnp_init_resource(res); |
292 | } | 292 | } |
293 | } | 293 | } |
294 | for (idx = 0; idx < PNP_MAX_PORT; idx++) { | 294 | for (idx = 0; idx < PNP_MAX_PORT; idx++) { |
295 | res = &dev->res->port_resource[idx]; | 295 | res = &dev->res->port[idx].res; |
296 | if (res->flags & IORESOURCE_AUTO) { | 296 | if (res->flags & IORESOURCE_AUTO) { |
297 | res->flags = IORESOURCE_IO; | 297 | res->flags = IORESOURCE_IO; |
298 | pnp_init_resource(res); | 298 | pnp_init_resource(res); |
299 | } | 299 | } |
300 | } | 300 | } |
301 | for (idx = 0; idx < PNP_MAX_MEM; idx++) { | 301 | for (idx = 0; idx < PNP_MAX_MEM; idx++) { |
302 | res = &dev->res->mem_resource[idx]; | 302 | res = &dev->res->mem[idx].res; |
303 | if (res->flags & IORESOURCE_AUTO) { | 303 | if (res->flags & IORESOURCE_AUTO) { |
304 | res->flags = IORESOURCE_MEM; | 304 | res->flags = IORESOURCE_MEM; |
305 | pnp_init_resource(res); | 305 | pnp_init_resource(res); |