diff options
Diffstat (limited to 'drivers/acpi/pci_bind.c')
-rw-r--r-- | drivers/acpi/pci_bind.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c index 2ef04098cc1d..a1dee29beed3 100644 --- a/drivers/acpi/pci_bind.c +++ b/drivers/acpi/pci_bind.c | |||
@@ -45,11 +45,12 @@ static int acpi_pci_unbind(struct acpi_device *device) | |||
45 | 45 | ||
46 | device_set_run_wake(&dev->dev, false); | 46 | device_set_run_wake(&dev->dev, false); |
47 | pci_acpi_remove_pm_notifier(device); | 47 | pci_acpi_remove_pm_notifier(device); |
48 | acpi_power_resource_unregister_device(&dev->dev, device->handle); | ||
48 | 49 | ||
49 | if (!dev->subordinate) | 50 | if (!dev->subordinate) |
50 | goto out; | 51 | goto out; |
51 | 52 | ||
52 | acpi_pci_irq_del_prt(dev->subordinate); | 53 | acpi_pci_irq_del_prt(pci_domain_nr(dev->bus), dev->subordinate->number); |
53 | 54 | ||
54 | device->ops.bind = NULL; | 55 | device->ops.bind = NULL; |
55 | device->ops.unbind = NULL; | 56 | device->ops.unbind = NULL; |
@@ -63,7 +64,7 @@ static int acpi_pci_bind(struct acpi_device *device) | |||
63 | { | 64 | { |
64 | acpi_status status; | 65 | acpi_status status; |
65 | acpi_handle handle; | 66 | acpi_handle handle; |
66 | struct pci_bus *bus; | 67 | unsigned char bus; |
67 | struct pci_dev *dev; | 68 | struct pci_dev *dev; |
68 | 69 | ||
69 | dev = acpi_get_pci_dev(device->handle); | 70 | dev = acpi_get_pci_dev(device->handle); |
@@ -71,6 +72,7 @@ static int acpi_pci_bind(struct acpi_device *device) | |||
71 | return 0; | 72 | return 0; |
72 | 73 | ||
73 | pci_acpi_add_pm_notifier(device, dev); | 74 | pci_acpi_add_pm_notifier(device, dev); |
75 | acpi_power_resource_register_device(&dev->dev, device->handle); | ||
74 | if (device->wakeup.flags.run_wake) | 76 | if (device->wakeup.flags.run_wake) |
75 | device_set_run_wake(&dev->dev, true); | 77 | device_set_run_wake(&dev->dev, true); |
76 | 78 | ||
@@ -100,11 +102,11 @@ static int acpi_pci_bind(struct acpi_device *device) | |||
100 | goto out; | 102 | goto out; |
101 | 103 | ||
102 | if (dev->subordinate) | 104 | if (dev->subordinate) |
103 | bus = dev->subordinate; | 105 | bus = dev->subordinate->number; |
104 | else | 106 | else |
105 | bus = dev->bus; | 107 | bus = dev->bus->number; |
106 | 108 | ||
107 | acpi_pci_irq_add_prt(device->handle, bus); | 109 | acpi_pci_irq_add_prt(device->handle, pci_domain_nr(dev->bus), bus); |
108 | 110 | ||
109 | out: | 111 | out: |
110 | pci_dev_put(dev); | 112 | pci_dev_put(dev); |