summaryrefslogtreecommitdiff
path: root/drivers/acpi/pci_bind.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-10-30 15:24:06 +0900
committerBjorn Helgaas <bhelgaas@google.com>2012-11-05 15:54:22 -0700
commit79c4412298771b8996302806abc8a11e760da9b3 (patch)
treec2c43b5ddc39a749ec4d48cff023c3d20eb78c28 /drivers/acpi/pci_bind.c
parentf426cef3bc58806284e0fee55d29262b10279f9c (diff)
ACPI: Pass segment/bus to _PRT add/del so they don't depend on pci_bus
This effectively reverts 859a3f86ca8 ("ACPI: simplify acpi_pci_irq_add_prt() API") and d9efae3688a ("ACPI: simplify acpi_pci_irq_del_prt() API"). The reason is to disentangle these routines from the struct pci_bus. We want to be able to add the _PRT before the struct pci_bus exists, and delete the _PRT after we've removed the pci_bus. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Diffstat (limited to 'drivers/acpi/pci_bind.c')
-rw-r--r--drivers/acpi/pci_bind.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
index 2ef04098cc1d..911144b22c89 100644
--- a/drivers/acpi/pci_bind.c
+++ b/drivers/acpi/pci_bind.c
@@ -49,7 +49,7 @@ static int acpi_pci_unbind(struct acpi_device *device)
if (!dev->subordinate)
goto out;
- acpi_pci_irq_del_prt(dev->subordinate);
+ acpi_pci_irq_del_prt(pci_domain_nr(dev->bus), dev->subordinate->number);
device->ops.bind = NULL;
device->ops.unbind = NULL;
@@ -63,7 +63,7 @@ static int acpi_pci_bind(struct acpi_device *device)
{
acpi_status status;
acpi_handle handle;
- struct pci_bus *bus;
+ unsigned char bus;
struct pci_dev *dev;
dev = acpi_get_pci_dev(device->handle);
@@ -100,11 +100,11 @@ static int acpi_pci_bind(struct acpi_device *device)
goto out;
if (dev->subordinate)
- bus = dev->subordinate;
+ bus = dev->subordinate->number;
else
- bus = dev->bus;
+ bus = dev->bus->number;
- acpi_pci_irq_add_prt(device->handle, bus);
+ acpi_pci_irq_add_prt(device->handle, pci_domain_nr(dev->bus), bus);
out:
pci_dev_put(dev);