]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ACPI: simplify acpi_pci_irq_del_prt() API
authorAlexander Chiang <achiang@hp.com>
Wed, 10 Jun 2009 19:55:40 +0000 (19:55 +0000)
committerLen Brown <len.brown@intel.com>
Thu, 18 Jun 2009 03:22:16 +0000 (23:22 -0400)
There is no need to pass a segment/bus tuple to this API, as the callsite
always has a struct pci_bus. We can derive segment/bus from the
struct pci_bus, so let's take this opportunit to simplify the API and
make life easier for the callers.

Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/pci_bind.c
drivers/acpi/pci_irq.c
include/acpi/acpi_drivers.h

index 6eb58ef366efeb20f6a3f77ad23e6f1afe9fc152..62cb383222f8554b592398384e353cc7a22b973b 100644 (file)
@@ -113,8 +113,7 @@ static int acpi_pci_unbind(struct acpi_device *device)
                return 0;
 
        if (dev->subordinate)
-               acpi_pci_irq_del_prt(pci_domain_nr(dev->bus),
-                                    dev->subordinate->number);
+               acpi_pci_irq_del_prt(dev->subordinate);
 
        pci_dev_put(dev);
        return 0;
index 3ed944cefb364cb3ebfa56084cfa267c6e637a2d..ef9509e33191586f38e80c98a6d2ef861dacffcc 100644 (file)
@@ -280,16 +280,17 @@ int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus)
        return 0;
 }
 
-void acpi_pci_irq_del_prt(int segment, int bus)
+void acpi_pci_irq_del_prt(struct pci_bus *bus)
 {
        struct acpi_prt_entry *entry, *tmp;
 
        printk(KERN_DEBUG
               "ACPI: Delete PCI Interrupt Routing Table for %04x:%02x\n",
-              segment, bus);
+              pci_domain_nr(bus), bus->number);
        spin_lock(&acpi_prt_lock);
        list_for_each_entry_safe(entry, tmp, &acpi_prt_list, list) {
-               if (segment == entry->id.segment && bus == entry->id.bus) {
+               if (pci_domain_nr(bus) == entry->id.segment
+                       && bus->number == entry->id.bus) {
                        list_del(&entry->list);
                        kfree(entry);
                }
index 686a960bde39bd208640cc21a4493f74816bf32e..98ebaaedc07f888a8274ab4e8a562bfea1acac8d 100644 (file)
@@ -92,7 +92,7 @@ int acpi_pci_link_free_irq(acpi_handle handle);
 /* ACPI PCI Interrupt Routing (pci_irq.c) */
 
 int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus);
-void acpi_pci_irq_del_prt(int segment, int bus);
+void acpi_pci_irq_del_prt(struct pci_bus *bus);
 
 /* ACPI PCI Device Binding (pci_bind.c) */