diff options
Diffstat (limited to 'drivers/pnp/resource.c')
-rw-r--r-- | drivers/pnp/resource.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 0797a77bd042..ff79aa6168cf 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c | |||
@@ -537,15 +537,10 @@ struct pnp_resource *pnp_add_irq_resource(struct pnp_dev *dev, int irq, | |||
537 | { | 537 | { |
538 | struct pnp_resource *pnp_res; | 538 | struct pnp_resource *pnp_res; |
539 | struct resource *res; | 539 | struct resource *res; |
540 | static unsigned char warned; | ||
541 | 540 | ||
542 | pnp_res = pnp_new_resource(dev); | 541 | pnp_res = pnp_new_resource(dev); |
543 | if (!pnp_res) { | 542 | if (!pnp_res) { |
544 | if (!warned) { | 543 | dev_err(&dev->dev, "can't add resource for IRQ %d\n", irq); |
545 | dev_err(&dev->dev, "can't add resource for IRQ %d\n", | ||
546 | irq); | ||
547 | warned = 1; | ||
548 | } | ||
549 | return NULL; | 544 | return NULL; |
550 | } | 545 | } |
551 | 546 | ||
@@ -563,15 +558,10 @@ struct pnp_resource *pnp_add_dma_resource(struct pnp_dev *dev, int dma, | |||
563 | { | 558 | { |
564 | struct pnp_resource *pnp_res; | 559 | struct pnp_resource *pnp_res; |
565 | struct resource *res; | 560 | struct resource *res; |
566 | static unsigned char warned; | ||
567 | 561 | ||
568 | pnp_res = pnp_new_resource(dev); | 562 | pnp_res = pnp_new_resource(dev); |
569 | if (!pnp_res) { | 563 | if (!pnp_res) { |
570 | if (!warned) { | 564 | dev_err(&dev->dev, "can't add resource for DMA %d\n", dma); |
571 | dev_err(&dev->dev, "can't add resource for DMA %d\n", | ||
572 | dma); | ||
573 | warned = 1; | ||
574 | } | ||
575 | return NULL; | 565 | return NULL; |
576 | } | 566 | } |
577 | 567 | ||
@@ -590,16 +580,12 @@ struct pnp_resource *pnp_add_io_resource(struct pnp_dev *dev, | |||
590 | { | 580 | { |
591 | struct pnp_resource *pnp_res; | 581 | struct pnp_resource *pnp_res; |
592 | struct resource *res; | 582 | struct resource *res; |
593 | static unsigned char warned; | ||
594 | 583 | ||
595 | pnp_res = pnp_new_resource(dev); | 584 | pnp_res = pnp_new_resource(dev); |
596 | if (!pnp_res) { | 585 | if (!pnp_res) { |
597 | if (!warned) { | 586 | dev_err(&dev->dev, "can't add resource for IO %#llx-%#llx\n", |
598 | dev_err(&dev->dev, "can't add resource for IO " | 587 | (unsigned long long) start, |
599 | "%#llx-%#llx\n",(unsigned long long) start, | 588 | (unsigned long long) end); |
600 | (unsigned long long) end); | ||
601 | warned = 1; | ||
602 | } | ||
603 | return NULL; | 589 | return NULL; |
604 | } | 590 | } |
605 | 591 | ||
@@ -619,16 +605,12 @@ struct pnp_resource *pnp_add_mem_resource(struct pnp_dev *dev, | |||
619 | { | 605 | { |
620 | struct pnp_resource *pnp_res; | 606 | struct pnp_resource *pnp_res; |
621 | struct resource *res; | 607 | struct resource *res; |
622 | static unsigned char warned; | ||
623 | 608 | ||
624 | pnp_res = pnp_new_resource(dev); | 609 | pnp_res = pnp_new_resource(dev); |
625 | if (!pnp_res) { | 610 | if (!pnp_res) { |
626 | if (!warned) { | 611 | dev_err(&dev->dev, "can't add resource for MEM %#llx-%#llx\n", |
627 | dev_err(&dev->dev, "can't add resource for MEM " | 612 | (unsigned long long) start, |
628 | "%#llx-%#llx\n",(unsigned long long) start, | 613 | (unsigned long long) end); |
629 | (unsigned long long) end); | ||
630 | warned = 1; | ||
631 | } | ||
632 | return NULL; | 614 | return NULL; |
633 | } | 615 | } |
634 | 616 | ||