Commit 2d1e0a02 authored by Patrick Mochel's avatar Patrick Mochel Committed by Len Brown

ACPI: pci_root: Use acpi_device's handle instead of driver's

Signed-off-by: default avatarPatrick Mochel <mochel@linux.intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 67a71365
...@@ -84,7 +84,7 @@ int acpi_pci_register_driver(struct acpi_pci_driver *driver) ...@@ -84,7 +84,7 @@ int acpi_pci_register_driver(struct acpi_pci_driver *driver)
list_for_each(entry, &acpi_pci_roots) { list_for_each(entry, &acpi_pci_roots) {
struct acpi_pci_root *root; struct acpi_pci_root *root;
root = list_entry(entry, struct acpi_pci_root, node); root = list_entry(entry, struct acpi_pci_root, node);
driver->add(root->handle); driver->add(root->device->handle);
n++; n++;
} }
...@@ -111,7 +111,7 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver) ...@@ -111,7 +111,7 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver)
list_for_each(entry, &acpi_pci_roots) { list_for_each(entry, &acpi_pci_roots) {
struct acpi_pci_root *root; struct acpi_pci_root *root;
root = list_entry(entry, struct acpi_pci_root, node); root = list_entry(entry, struct acpi_pci_root, node);
driver->remove(root->handle); driver->remove(root->device->handle);
} }
} }
...@@ -187,7 +187,7 @@ static int acpi_pci_root_add(struct acpi_device *device) ...@@ -187,7 +187,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
* ------- * -------
* Obtained via _SEG, if exists, otherwise assumed to be zero (0). * Obtained via _SEG, if exists, otherwise assumed to be zero (0).
*/ */
status = acpi_evaluate_integer(root->handle, METHOD_NAME__SEG, NULL, status = acpi_evaluate_integer(device->handle, METHOD_NAME__SEG, NULL,
&value); &value);
switch (status) { switch (status) {
case AE_OK: case AE_OK:
...@@ -209,7 +209,7 @@ static int acpi_pci_root_add(struct acpi_device *device) ...@@ -209,7 +209,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
* --- * ---
* Obtained via _BBN, if exists, otherwise assumed to be zero (0). * Obtained via _BBN, if exists, otherwise assumed to be zero (0).
*/ */
status = acpi_evaluate_integer(root->handle, METHOD_NAME__BBN, NULL, status = acpi_evaluate_integer(device->handle, METHOD_NAME__BBN, NULL,
&value); &value);
switch (status) { switch (status) {
case AE_OK: case AE_OK:
...@@ -236,7 +236,7 @@ static int acpi_pci_root_add(struct acpi_device *device) ...@@ -236,7 +236,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
"Wrong _BBN value, reboot" "Wrong _BBN value, reboot"
" and use option 'pci=noacpi'\n"); " and use option 'pci=noacpi'\n");
status = try_get_root_bridge_busnr(root->handle, &bus); status = try_get_root_bridge_busnr(device->handle, &bus);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
break; break;
if (bus != root->id.bus) { if (bus != root->id.bus) {
...@@ -296,9 +296,9 @@ static int acpi_pci_root_add(struct acpi_device *device) ...@@ -296,9 +296,9 @@ static int acpi_pci_root_add(struct acpi_device *device)
* ----------------- * -----------------
* Evaluate and parse _PRT, if exists. * Evaluate and parse _PRT, if exists.
*/ */
status = acpi_get_handle(root->handle, METHOD_NAME__PRT, &handle); status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle);
if (ACPI_SUCCESS(status)) if (ACPI_SUCCESS(status))
result = acpi_pci_irq_add_prt(root->handle, root->id.segment, result = acpi_pci_irq_add_prt(device->handle, root->id.segment,
root->id.bus); root->id.bus);
end: end:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment