aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp/resource.c')
-rw-r--r--drivers/pnp/resource.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index f89945ebd8b6..eab16e5520ae 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -270,9 +270,9 @@ int pnp_check_port(struct pnp_dev *dev, int idx)
270 } 270 }
271 271
272 /* check for internal conflicts */ 272 /* check for internal conflicts */
273 for (i = 0; i < PNP_MAX_PORT && i != idx; i++) { 273 for (i = 0; i < PNP_MAX_PORT; i++) {
274 tres = &dev->res.port_resource[i]; 274 tres = &dev->res.port_resource[i];
275 if (tres->flags & IORESOURCE_IO) { 275 if (tres != res && tres->flags & IORESOURCE_IO) {
276 tport = &tres->start; 276 tport = &tres->start;
277 tend = &tres->end; 277 tend = &tres->end;
278 if (ranged_conflict(port, end, tport, tend)) 278 if (ranged_conflict(port, end, tport, tend))
@@ -331,9 +331,9 @@ int pnp_check_mem(struct pnp_dev *dev, int idx)
331 } 331 }
332 332
333 /* check for internal conflicts */ 333 /* check for internal conflicts */
334 for (i = 0; i < PNP_MAX_MEM && i != idx; i++) { 334 for (i = 0; i < PNP_MAX_MEM; i++) {
335 tres = &dev->res.mem_resource[i]; 335 tres = &dev->res.mem_resource[i];
336 if (tres->flags & IORESOURCE_MEM) { 336 if (tres != res && tres->flags & IORESOURCE_MEM) {
337 taddr = &tres->start; 337 taddr = &tres->start;
338 tend = &tres->end; 338 tend = &tres->end;
339 if (ranged_conflict(addr, end, taddr, tend)) 339 if (ranged_conflict(addr, end, taddr, tend))
@@ -391,9 +391,9 @@ int pnp_check_irq(struct pnp_dev *dev, int idx)
391 } 391 }
392 392
393 /* check for internal conflicts */ 393 /* check for internal conflicts */
394 for (i = 0; i < PNP_MAX_IRQ && i != idx; i++) { 394 for (i = 0; i < PNP_MAX_IRQ; i++) {
395 tres = &dev->res.irq_resource[i]; 395 tres = &dev->res.irq_resource[i];
396 if (tres->flags & IORESOURCE_IRQ) { 396 if (tres != res && tres->flags & IORESOURCE_IRQ) {
397 if (tres->start == *irq) 397 if (tres->start == *irq)
398 return 0; 398 return 0;
399 } 399 }
@@ -465,9 +465,9 @@ int pnp_check_dma(struct pnp_dev *dev, int idx)
465 } 465 }
466 466
467 /* check for internal conflicts */ 467 /* check for internal conflicts */
468 for (i = 0; i < PNP_MAX_DMA && i != idx; i++) { 468 for (i = 0; i < PNP_MAX_DMA; i++) {
469 tres = &dev->res.dma_resource[i]; 469 tres = &dev->res.dma_resource[i];
470 if (tres->flags & IORESOURCE_DMA) { 470 if (tres != res && tres->flags & IORESOURCE_DMA) {
471 if (tres->start == *dma) 471 if (tres->start == *dma)
472 return 0; 472 return 0;
473 } 473 }