diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/pci_root.c | 8 | ||||
-rw-r--r-- | drivers/acpi/pci_slot.c | 11 |
2 files changed, 10 insertions, 9 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index d710585e4a7f..2868a9ff6d07 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -87,7 +87,7 @@ int acpi_pci_register_driver(struct acpi_pci_driver *driver) list_add_tail(&driver->node, &acpi_pci_drivers); if (driver->add) list_for_each_entry(root, &acpi_pci_roots, node) { - driver->add(root->device->handle); + driver->add(root); n++; } mutex_unlock(&acpi_pci_root_lock); @@ -104,7 +104,7 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver) list_del(&driver->node); if (driver->remove) list_for_each_entry(root, &acpi_pci_roots, node) - driver->remove(root->device->handle); + driver->remove(root); mutex_unlock(&acpi_pci_root_lock); } EXPORT_SYMBOL(acpi_pci_unregister_driver); @@ -629,7 +629,7 @@ static int acpi_pci_root_start(struct acpi_device *device) mutex_lock(&acpi_pci_root_lock); list_for_each_entry(driver, &acpi_pci_drivers, node) if (driver->add) - driver->add(device->handle); + driver->add(root); mutex_unlock(&acpi_pci_root_lock); pci_bus_add_devices(root->bus); @@ -645,7 +645,7 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type) mutex_lock(&acpi_pci_root_lock); list_for_each_entry(driver, &acpi_pci_drivers, node) if (driver->remove) - driver->remove(root->device->handle); + driver->remove(root); mutex_unlock(&acpi_pci_root_lock); device_set_run_wake(root->bus->bridge, false); diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c index e50e31a518af..8051ffa7609d 100644 --- a/drivers/acpi/pci_slot.c +++ b/drivers/acpi/pci_slot.c @@ -67,8 +67,8 @@ struct acpi_pci_slot { struct list_head list; /* node in the list of slots */ }; -static int acpi_pci_slot_add(acpi_handle handle); -static void acpi_pci_slot_remove(acpi_handle handle); +static int acpi_pci_slot_add(struct acpi_pci_root *root); +static void acpi_pci_slot_remove(struct acpi_pci_root *root); static LIST_HEAD(slot_list); static DEFINE_MUTEX(slot_list_lock); @@ -295,11 +295,11 @@ walk_root_bridge(acpi_handle handle, acpi_walk_callback user_function) * @handle: points to an acpi_pci_root */ static int -acpi_pci_slot_add(acpi_handle handle) +acpi_pci_slot_add(struct acpi_pci_root *root) { acpi_status status; - status = walk_root_bridge(handle, register_slot); + status = walk_root_bridge(root->device->handle, register_slot); if (ACPI_FAILURE(status)) err("%s: register_slot failure - %d\n", __func__, status); @@ -311,10 +311,11 @@ acpi_pci_slot_add(acpi_handle handle) * @handle: points to an acpi_pci_root */ static void -acpi_pci_slot_remove(acpi_handle handle) +acpi_pci_slot_remove(struct acpi_pci_root *root) { struct acpi_pci_slot *slot, *tmp; struct pci_bus *pbus; + acpi_handle handle = root->device->handle; mutex_lock(&slot_list_lock); list_for_each_entry_safe(slot, tmp, &slot_list, list) { |