ACPI / hotplug / PCI: Drop handle field from struct acpiphp_bridge
The handle field in struct acpiphp_bridge is only used by acpiphp_enumerate_slots(), but in that function the local handle variable can be used instead, so make that happen and drop handle from struct acpiphp_bridge. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
parent
5a3bc573ae
commit
89373a55d2
@ -77,7 +77,6 @@ struct acpiphp_bridge {
|
|||||||
struct list_head list;
|
struct list_head list;
|
||||||
struct list_head slots;
|
struct list_head slots;
|
||||||
struct kref ref;
|
struct kref ref;
|
||||||
acpi_handle handle;
|
|
||||||
|
|
||||||
struct acpiphp_context *context;
|
struct acpiphp_context *context;
|
||||||
|
|
||||||
|
@ -1084,7 +1084,6 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
|
|||||||
|
|
||||||
INIT_LIST_HEAD(&bridge->slots);
|
INIT_LIST_HEAD(&bridge->slots);
|
||||||
kref_init(&bridge->ref);
|
kref_init(&bridge->ref);
|
||||||
bridge->handle = handle;
|
|
||||||
bridge->pci_dev = pci_dev_get(bus->self);
|
bridge->pci_dev = pci_dev_get(bus->self);
|
||||||
bridge->pci_bus = bus;
|
bridge->pci_bus = bus;
|
||||||
|
|
||||||
@ -1124,10 +1123,10 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
|
|||||||
mutex_unlock(&bridge_mutex);
|
mutex_unlock(&bridge_mutex);
|
||||||
|
|
||||||
/* register all slot objects under this bridge */
|
/* register all slot objects under this bridge */
|
||||||
status = acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge->handle, 1,
|
status = acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, 1,
|
||||||
register_slot, NULL, bridge, NULL);
|
register_slot, NULL, bridge, NULL);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
acpi_handle_err(bridge->handle, "failed to register slots\n");
|
acpi_handle_err(handle, "failed to register slots\n");
|
||||||
cleanup_bridge(bridge);
|
cleanup_bridge(bridge);
|
||||||
put_bridge(bridge);
|
put_bridge(bridge);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user