diff options
author | Alexander Chiang <achiang@hp.com> | 2009-06-10 15:55:40 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-06-17 23:22:16 -0400 |
commit | d9efae3688addb15994c9ad9761dada6f988bc14 (patch) | |
tree | 6d697c2cca0aa47b6f50880682699eaca72e9197 | |
parent | 859a3f86ca83346f4097e956d0b27d96aa7a1cff (diff) |
ACPI: simplify acpi_pci_irq_del_prt() API
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>
-rw-r--r-- | drivers/acpi/pci_bind.c | 3 | ||||
-rw-r--r-- | drivers/acpi/pci_irq.c | 7 | ||||
-rw-r--r-- | include/acpi/acpi_drivers.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c index 6eb58ef366ef..62cb383222f8 100644 --- a/drivers/acpi/pci_bind.c +++ b/drivers/acpi/pci_bind.c | |||
@@ -113,8 +113,7 @@ static int acpi_pci_unbind(struct acpi_device *device) | |||
113 | return 0; | 113 | return 0; |
114 | 114 | ||
115 | if (dev->subordinate) | 115 | if (dev->subordinate) |
116 | acpi_pci_irq_del_prt(pci_domain_nr(dev->bus), | 116 | acpi_pci_irq_del_prt(dev->subordinate); |
117 | dev->subordinate->number); | ||
118 | 117 | ||
119 | pci_dev_put(dev); | 118 | pci_dev_put(dev); |
120 | return 0; | 119 | return 0; |
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 3ed944cefb36..ef9509e33191 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -280,16 +280,17 @@ int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus) | |||
280 | return 0; | 280 | return 0; |
281 | } | 281 | } |
282 | 282 | ||
283 | void acpi_pci_irq_del_prt(int segment, int bus) | 283 | void acpi_pci_irq_del_prt(struct pci_bus *bus) |
284 | { | 284 | { |
285 | struct acpi_prt_entry *entry, *tmp; | 285 | struct acpi_prt_entry *entry, *tmp; |
286 | 286 | ||
287 | printk(KERN_DEBUG | 287 | printk(KERN_DEBUG |
288 | "ACPI: Delete PCI Interrupt Routing Table for %04x:%02x\n", | 288 | "ACPI: Delete PCI Interrupt Routing Table for %04x:%02x\n", |
289 | segment, bus); | 289 | pci_domain_nr(bus), bus->number); |
290 | spin_lock(&acpi_prt_lock); | 290 | spin_lock(&acpi_prt_lock); |
291 | list_for_each_entry_safe(entry, tmp, &acpi_prt_list, list) { | 291 | list_for_each_entry_safe(entry, tmp, &acpi_prt_list, list) { |
292 | if (segment == entry->id.segment && bus == entry->id.bus) { | 292 | if (pci_domain_nr(bus) == entry->id.segment |
293 | && bus->number == entry->id.bus) { | ||
293 | list_del(&entry->list); | 294 | list_del(&entry->list); |
294 | kfree(entry); | 295 | kfree(entry); |
295 | } | 296 | } |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 686a960bde39..98ebaaedc07f 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -92,7 +92,7 @@ int acpi_pci_link_free_irq(acpi_handle handle); | |||
92 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ | 92 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ |
93 | 93 | ||
94 | int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus); | 94 | int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus); |
95 | void acpi_pci_irq_del_prt(int segment, int bus); | 95 | void acpi_pci_irq_del_prt(struct pci_bus *bus); |
96 | 96 | ||
97 | /* ACPI PCI Device Binding (pci_bind.c) */ | 97 | /* ACPI PCI Device Binding (pci_bind.c) */ |
98 | 98 | ||