aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_irq.c
diff options
context:
space:
mode:
authorAlexander Chiang <achiang@hp.com>2009-06-10 15:55:35 -0400
committerLen Brown <len.brown@intel.com>2009-06-17 23:22:16 -0400
commit859a3f86ca83346f4097e956d0b27d96aa7a1cff (patch)
treeba56cc791a0c427ab817a86e57a6338c23bbb3c1 /drivers/acpi/pci_irq.c
parent499650de6906722184b639989b47227a362b62f8 (diff)
ACPI: simplify acpi_pci_irq_add_prt() API
A PCI domain cannot change as you descend down subordinate buses, which makes the 'segment' argument to acpi_pci_irq_add_prt() useless. Change the interface to take a struct pci_bus *, from whence we can derive the bus number and segment. Reducing the number of arguments makes life simpler for 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>
Diffstat (limited to 'drivers/acpi/pci_irq.c')
-rw-r--r--drivers/acpi/pci_irq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 51b9f8280f88..3ed944cefb36 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -182,7 +182,7 @@ static void do_prt_fixups(struct acpi_prt_entry *entry,
182 } 182 }
183} 183}
184 184
185static int acpi_pci_irq_add_entry(acpi_handle handle, int segment, int bus, 185static int acpi_pci_irq_add_entry(acpi_handle handle, struct pci_bus *bus,
186 struct acpi_pci_routing_table *prt) 186 struct acpi_pci_routing_table *prt)
187{ 187{
188 struct acpi_prt_entry *entry; 188 struct acpi_prt_entry *entry;
@@ -196,8 +196,8 @@ static int acpi_pci_irq_add_entry(acpi_handle handle, int segment, int bus,
196 * 1=INTA, 2=INTB. We use the PCI encoding throughout, so convert 196 * 1=INTA, 2=INTB. We use the PCI encoding throughout, so convert
197 * it here. 197 * it here.
198 */ 198 */
199 entry->id.segment = segment; 199 entry->id.segment = pci_domain_nr(bus);
200 entry->id.bus = bus; 200 entry->id.bus = bus->number;
201 entry->id.device = (prt->address >> 16) & 0xFFFF; 201 entry->id.device = (prt->address >> 16) & 0xFFFF;
202 entry->pin = prt->pin + 1; 202 entry->pin = prt->pin + 1;
203 203
@@ -242,7 +242,7 @@ static int acpi_pci_irq_add_entry(acpi_handle handle, int segment, int bus,
242 return 0; 242 return 0;
243} 243}
244 244
245int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus) 245int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus)
246{ 246{
247 acpi_status status; 247 acpi_status status;
248 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 248 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -271,7 +271,7 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
271 271
272 entry = buffer.pointer; 272 entry = buffer.pointer;
273 while (entry && (entry->length > 0)) { 273 while (entry && (entry->length > 0)) {
274 acpi_pci_irq_add_entry(handle, segment, bus, entry); 274 acpi_pci_irq_add_entry(handle, bus, entry);
275 entry = (struct acpi_pci_routing_table *) 275 entry = (struct acpi_pci_routing_table *)
276 ((unsigned long)entry + entry->length); 276 ((unsigned long)entry + entry->length);
277 } 277 }