diff mbox

[9/30] ACPI / hotplug / PCI: Drop func field from struct acpiphp_bridge

Message ID 14183515.KN6khfkHh2@vostro.rjw.lan (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Rafael Wysocki July 17, 2013, 11:21 p.m. UTC
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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>
---
 drivers/pci/hotplug/acpiphp.h      |    2 --
 drivers/pci/hotplug/acpiphp_glue.c |    3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux-pm/drivers/pci/hotplug/acpiphp.h
===================================================================
--- linux-pm.orig/drivers/pci/hotplug/acpiphp.h
+++ linux-pm/drivers/pci/hotplug/acpiphp.h
@@ -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: linux-pm/drivers/pci/hotplug/acpiphp_glue.c
===================================================================
--- linux-pm.orig/drivers/pci/hotplug/acpiphp_glue.c
+++ linux-pm/drivers/pci/hotplug/acpiphp_glue.c
@@ -181,7 +181,7 @@  static void free_bridge(struct kref *kre
 	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_
 	}
 	if (context->handler_for_func) {
 		/* Notify handler already installed. */
-		bridge->func = context->func;
 		get_bridge(context->func->slot->bridge);
 		return;
 	}