diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-06-27 10:45:39 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2008-07-16 17:27:07 -0400 |
commit | c83642d5123225a22cccd75adea6e97c245714cb (patch) | |
tree | 4b5ebc4426d71b8a600e49a17ee0f83e94052869 | |
parent | 40ab4f4c1d843362eb26d83425317e91fbd98b17 (diff) |
ACPI: use dev_printk when possible
Convert printks to use dev_printk(). The most obvious change will
be messages like this:
-ACPI: PCI Interrupt 0000:00:04.0[A] -> GSI 31 (level, low) -> IRQ 31
+cciss 0000:00:04.0: PCI INT A -> GSI 31 (level, low) -> IRQ 31
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | drivers/acpi/pci_irq.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 89022a74faee..11acaee14d66 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -162,7 +162,7 @@ do_prt_fixups(struct acpi_prt_entry *entry, struct acpi_pci_routing_table *prt) | |||
162 | !strcmp(prt->source, quirk->source) && | 162 | !strcmp(prt->source, quirk->source) && |
163 | strlen(prt->source) >= strlen(quirk->actual_source)) { | 163 | strlen(prt->source) >= strlen(quirk->actual_source)) { |
164 | printk(KERN_WARNING PREFIX "firmware reports " | 164 | printk(KERN_WARNING PREFIX "firmware reports " |
165 | "%04x:%02x:%02x[%c] connected to %s; " | 165 | "%04x:%02x:%02x PCI INT %c connected to %s; " |
166 | "changing to %s\n", | 166 | "changing to %s\n", |
167 | entry->id.segment, entry->id.bus, | 167 | entry->id.segment, entry->id.bus, |
168 | entry->id.device, 'A' + entry->pin, | 168 | entry->id.device, 'A' + entry->pin, |
@@ -429,7 +429,7 @@ acpi_pci_irq_derive(struct pci_dev *dev, | |||
429 | { | 429 | { |
430 | struct pci_dev *bridge = dev; | 430 | struct pci_dev *bridge = dev; |
431 | int irq = -1; | 431 | int irq = -1; |
432 | u8 bridge_pin = 0; | 432 | u8 bridge_pin = 0, orig_pin = pin; |
433 | 433 | ||
434 | 434 | ||
435 | if (!dev) | 435 | if (!dev) |
@@ -463,8 +463,8 @@ acpi_pci_irq_derive(struct pci_dev *dev, | |||
463 | } | 463 | } |
464 | 464 | ||
465 | if (irq < 0) { | 465 | if (irq < 0) { |
466 | printk(KERN_WARNING PREFIX "Unable to derive IRQ for device %s\n", | 466 | dev_warn(&dev->dev, "can't derive routing for PCI INT %c\n", |
467 | pci_name(dev)); | 467 | 'A' + orig_pin); |
468 | return -1; | 468 | return -1; |
469 | } | 469 | } |
470 | 470 | ||
@@ -487,6 +487,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
487 | int triggering = ACPI_LEVEL_SENSITIVE; | 487 | int triggering = ACPI_LEVEL_SENSITIVE; |
488 | int polarity = ACPI_ACTIVE_LOW; | 488 | int polarity = ACPI_ACTIVE_LOW; |
489 | char *link = NULL; | 489 | char *link = NULL; |
490 | char link_desc[16]; | ||
490 | int rc; | 491 | int rc; |
491 | 492 | ||
492 | 493 | ||
@@ -503,7 +504,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
503 | pin--; | 504 | pin--; |
504 | 505 | ||
505 | if (!dev->bus) { | 506 | if (!dev->bus) { |
506 | printk(KERN_ERR PREFIX "Invalid (NULL) 'bus' field\n"); | 507 | dev_err(&dev->dev, "invalid (NULL) 'bus' field\n"); |
507 | return -ENODEV; | 508 | return -ENODEV; |
508 | } | 509 | } |
509 | 510 | ||
@@ -538,8 +539,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
538 | * driver reported one, then use it. Exit in any case. | 539 | * driver reported one, then use it. Exit in any case. |
539 | */ | 540 | */ |
540 | if (irq < 0) { | 541 | if (irq < 0) { |
541 | printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: no GSI", | 542 | dev_warn(&dev->dev, "PCI INT %c: no GSI", 'A' + pin); |
542 | pci_name(dev), ('A' + pin)); | ||
543 | /* Interrupt Line values above 0xF are forbidden */ | 543 | /* Interrupt Line values above 0xF are forbidden */ |
544 | if (dev->irq > 0 && (dev->irq <= 0xF)) { | 544 | if (dev->irq > 0 && (dev->irq <= 0xF)) { |
545 | printk(" - using IRQ %d\n", dev->irq); | 545 | printk(" - using IRQ %d\n", dev->irq); |
@@ -554,21 +554,21 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
554 | 554 | ||
555 | rc = acpi_register_gsi(irq, triggering, polarity); | 555 | rc = acpi_register_gsi(irq, triggering, polarity); |
556 | if (rc < 0) { | 556 | if (rc < 0) { |
557 | printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: failed " | 557 | dev_warn(&dev->dev, "PCI INT %c: failed to register GSI\n", |
558 | "to register GSI\n", pci_name(dev), ('A' + pin)); | 558 | 'A' + pin); |
559 | return rc; | 559 | return rc; |
560 | } | 560 | } |
561 | dev->irq = rc; | 561 | dev->irq = rc; |
562 | 562 | ||
563 | printk(KERN_INFO PREFIX "PCI Interrupt %s[%c] -> ", | ||
564 | pci_name(dev), 'A' + pin); | ||
565 | |||
566 | if (link) | 563 | if (link) |
567 | printk("Link [%s] -> ", link); | 564 | snprintf(link_desc, sizeof(link_desc), " -> Link[%s]", link); |
565 | else | ||
566 | link_desc[0] = '\0'; | ||
568 | 567 | ||
569 | printk("GSI %u (%s, %s) -> IRQ %d\n", irq, | 568 | dev_info(&dev->dev, "PCI INT %c%s -> GSI %u (%s, %s) -> IRQ %d\n", |
570 | (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge", | 569 | 'A' + pin, link_desc, irq, |
571 | (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq); | 570 | (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge", |
571 | (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq); | ||
572 | 572 | ||
573 | return 0; | 573 | return 0; |
574 | } | 574 | } |
@@ -616,10 +616,6 @@ void acpi_pci_irq_disable(struct pci_dev *dev) | |||
616 | * (e.g. PCI_UNDEFINED_IRQ). | 616 | * (e.g. PCI_UNDEFINED_IRQ). |
617 | */ | 617 | */ |
618 | 618 | ||
619 | printk(KERN_INFO PREFIX "PCI interrupt for device %s disabled\n", | 619 | dev_info(&dev->dev, "PCI INT %c disabled\n", 'A' + pin); |
620 | pci_name(dev)); | ||
621 | |||
622 | acpi_unregister_gsi(gsi); | 620 | acpi_unregister_gsi(gsi); |
623 | |||
624 | return; | ||
625 | } | 621 | } |