diff options
Diffstat (limited to 'drivers/pnp/support.c')
-rw-r--r-- | drivers/pnp/support.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pnp/support.c b/drivers/pnp/support.c index 3aeb154e27d6..3eba85ed729c 100644 --- a/drivers/pnp/support.c +++ b/drivers/pnp/support.c | |||
@@ -61,27 +61,27 @@ void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc) | |||
61 | dev_dbg(&dev->dev, "current resources: %s\n", desc); | 61 | dev_dbg(&dev->dev, "current resources: %s\n", desc); |
62 | 62 | ||
63 | for (i = 0; i < PNP_MAX_IRQ; i++) { | 63 | for (i = 0; i < PNP_MAX_IRQ; i++) { |
64 | res = &dev->res.irq_resource[i]; | 64 | res = pnp_get_resource(dev, IORESOURCE_IRQ, i); |
65 | if (!(res->flags & IORESOURCE_UNSET)) | 65 | if (res && !(res->flags & IORESOURCE_UNSET)) |
66 | dev_dbg(&dev->dev, " irq %lld flags %#lx\n", | 66 | dev_dbg(&dev->dev, " irq %lld flags %#lx\n", |
67 | (unsigned long long) res->start, res->flags); | 67 | (unsigned long long) res->start, res->flags); |
68 | } | 68 | } |
69 | for (i = 0; i < PNP_MAX_DMA; i++) { | 69 | for (i = 0; i < PNP_MAX_DMA; i++) { |
70 | res = &dev->res.dma_resource[i]; | 70 | res = pnp_get_resource(dev, IORESOURCE_DMA, i); |
71 | if (!(res->flags & IORESOURCE_UNSET)) | 71 | if (res && !(res->flags & IORESOURCE_UNSET)) |
72 | dev_dbg(&dev->dev, " dma %lld flags %#lx\n", | 72 | dev_dbg(&dev->dev, " dma %lld flags %#lx\n", |
73 | (unsigned long long) res->start, res->flags); | 73 | (unsigned long long) res->start, res->flags); |
74 | } | 74 | } |
75 | for (i = 0; i < PNP_MAX_PORT; i++) { | 75 | for (i = 0; i < PNP_MAX_PORT; i++) { |
76 | res = &dev->res.port_resource[i]; | 76 | res = pnp_get_resource(dev, IORESOURCE_IO, i); |
77 | if (!(res->flags & IORESOURCE_UNSET)) | 77 | if (res && !(res->flags & IORESOURCE_UNSET)) |
78 | dev_dbg(&dev->dev, " io %#llx-%#llx flags %#lx\n", | 78 | dev_dbg(&dev->dev, " io %#llx-%#llx flags %#lx\n", |
79 | (unsigned long long) res->start, | 79 | (unsigned long long) res->start, |
80 | (unsigned long long) res->end, res->flags); | 80 | (unsigned long long) res->end, res->flags); |
81 | } | 81 | } |
82 | for (i = 0; i < PNP_MAX_MEM; i++) { | 82 | for (i = 0; i < PNP_MAX_MEM; i++) { |
83 | res = &dev->res.mem_resource[i]; | 83 | res = pnp_get_resource(dev, IORESOURCE_MEM, i); |
84 | if (!(res->flags & IORESOURCE_UNSET)) | 84 | if (res && !(res->flags & IORESOURCE_UNSET)) |
85 | dev_dbg(&dev->dev, " mem %#llx-%#llx flags %#lx\n", | 85 | dev_dbg(&dev->dev, " mem %#llx-%#llx flags %#lx\n", |
86 | (unsigned long long) res->start, | 86 | (unsigned long long) res->start, |
87 | (unsigned long long) res->end, res->flags); | 87 | (unsigned long long) res->end, res->flags); |