ACPI / hotplug / PCI: Drop func field from struct acpiphp_bridge
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 13 Jul 2013 21:27:24 +0000 (23:27 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 23 Jul 2013 02:00:21 +0000 (04:00 +0200)
Since the func pointer in struct acpiphp_context can always be used
instead of the func pointer in struct acpiphp_bridge, drop the
latter.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pci/hotplug/acpiphp.h
drivers/pci/hotplug/acpiphp_glue.c

index b96a8a9c39c7ce33078401f89b49d2520abb4fb8..4980ff4919a6f0763a5e1e5a37a38a25abff5a2c 100644 (file)
@@ -79,8 +79,6 @@ struct acpiphp_bridge {
        acpi_handle handle;
 
        struct acpiphp_context *context;
-       /* Ejectable PCI-to-PCI bridge (PCI bridge and PCI function) */
-       struct acpiphp_func *func;
 
        int nr_slots;
 
index e2f9ea03aecef5e5b1c6c243ac9e8f3824b9f178..a83ce9db16bb021bd5e5ff2e57fec94d8f1b97ed 100644 (file)
@@ -181,7 +181,7 @@ static void free_bridge(struct kref *kref)
        context = bridge->context;
        /* Release the reference acquired by acpiphp_enumerate_slots(). */
        if (context->handler_for_func)
-               put_bridge(bridge->func->slot->bridge);
+               put_bridge(context->func->slot->bridge);
 
        put_device(&bridge->pci_bus->dev);
        pci_dev_put(bridge->pci_dev);
@@ -1212,7 +1212,6 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
        }
        if (context->handler_for_func) {
                /* Notify handler already installed. */
-               bridge->func = context->func;
                get_bridge(context->func->slot->bridge);
                return;
        }