diff options
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 3c5eb374adf8..f7b8648acbfa 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -76,6 +76,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, | |||
76 | int i = 0; | 76 | int i = 0; |
77 | int irq; | 77 | int irq; |
78 | int p, t; | 78 | int p, t; |
79 | static unsigned char warned; | ||
79 | 80 | ||
80 | if (!valid_IRQ(gsi)) | 81 | if (!valid_IRQ(gsi)) |
81 | return; | 82 | return; |
@@ -83,9 +84,10 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, | |||
83 | while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) && | 84 | while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) && |
84 | i < PNP_MAX_IRQ) | 85 | i < PNP_MAX_IRQ) |
85 | i++; | 86 | i++; |
86 | if (i >= PNP_MAX_IRQ) { | 87 | if (i >= PNP_MAX_IRQ && !warned) { |
87 | printk(KERN_ERR "pnpacpi: exceeded the max number of IRQ " | 88 | printk(KERN_ERR "pnpacpi: exceeded the max number of IRQ " |
88 | "resources: %d \n", PNP_MAX_IRQ); | 89 | "resources: %d \n", PNP_MAX_IRQ); |
90 | warned = 1; | ||
89 | return; | 91 | return; |
90 | } | 92 | } |
91 | /* | 93 | /* |
@@ -169,6 +171,7 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, | |||
169 | int bus_master, int transfer) | 171 | int bus_master, int transfer) |
170 | { | 172 | { |
171 | int i = 0; | 173 | int i = 0; |
174 | static unsigned char warned; | ||
172 | 175 | ||
173 | while (i < PNP_MAX_DMA && | 176 | while (i < PNP_MAX_DMA && |
174 | !(res->dma_resource[i].flags & IORESOURCE_UNSET)) | 177 | !(res->dma_resource[i].flags & IORESOURCE_UNSET)) |
@@ -183,9 +186,10 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, | |||
183 | } | 186 | } |
184 | res->dma_resource[i].start = dma; | 187 | res->dma_resource[i].start = dma; |
185 | res->dma_resource[i].end = dma; | 188 | res->dma_resource[i].end = dma; |
186 | } else { | 189 | } else if (!warned) { |
187 | printk(KERN_ERR "pnpacpi: exceeded the max number of DMA " | 190 | printk(KERN_ERR "pnpacpi: exceeded the max number of DMA " |
188 | "resources: %d \n", PNP_MAX_DMA); | 191 | "resources: %d \n", PNP_MAX_DMA); |
192 | warned = 1; | ||
189 | } | 193 | } |
190 | } | 194 | } |
191 | 195 | ||
@@ -193,6 +197,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res, | |||
193 | u64 io, u64 len, int io_decode) | 197 | u64 io, u64 len, int io_decode) |
194 | { | 198 | { |
195 | int i = 0; | 199 | int i = 0; |
200 | static unsigned char warned; | ||
196 | 201 | ||
197 | while (!(res->port_resource[i].flags & IORESOURCE_UNSET) && | 202 | while (!(res->port_resource[i].flags & IORESOURCE_UNSET) && |
198 | i < PNP_MAX_PORT) | 203 | i < PNP_MAX_PORT) |
@@ -207,7 +212,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res, | |||
207 | } | 212 | } |
208 | res->port_resource[i].start = io; | 213 | res->port_resource[i].start = io; |
209 | res->port_resource[i].end = io + len - 1; | 214 | res->port_resource[i].end = io + len - 1; |
210 | } else { | 215 | } else if (!warned) { |
211 | printk(KERN_ERR "pnpacpi: exceeded the max number of IO " | 216 | printk(KERN_ERR "pnpacpi: exceeded the max number of IO " |
212 | "resources: %d \n", PNP_MAX_PORT); | 217 | "resources: %d \n", PNP_MAX_PORT); |
213 | } | 218 | } |
@@ -218,6 +223,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res, | |||
218 | int write_protect) | 223 | int write_protect) |
219 | { | 224 | { |
220 | int i = 0; | 225 | int i = 0; |
226 | static unsigned char warned; | ||
221 | 227 | ||
222 | while (!(res->mem_resource[i].flags & IORESOURCE_UNSET) && | 228 | while (!(res->mem_resource[i].flags & IORESOURCE_UNSET) && |
223 | (i < PNP_MAX_MEM)) | 229 | (i < PNP_MAX_MEM)) |
@@ -233,7 +239,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res, | |||
233 | 239 | ||
234 | res->mem_resource[i].start = mem; | 240 | res->mem_resource[i].start = mem; |
235 | res->mem_resource[i].end = mem + len - 1; | 241 | res->mem_resource[i].end = mem + len - 1; |
236 | } else { | 242 | } else if (!warned) { |
237 | printk(KERN_ERR "pnpacpi: exceeded the max number of mem " | 243 | printk(KERN_ERR "pnpacpi: exceeded the max number of mem " |
238 | "resources: %d\n", PNP_MAX_MEM); | 244 | "resources: %d\n", PNP_MAX_MEM); |
239 | } | 245 | } |