aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-13 17:27:25 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-22 22:00:23 -0400
commit75a33ed1b58005e455cb6533a7689ac0eb6bedd6 (patch)
tree5c1403e820808c154b0c5a6774461fc4c7423013
parent7342798d0ab850a630877a362bc5a4f033100f37 (diff)
ACPI / hotplug / PCI: Drop flags field from struct acpiphp_bridge
The only bridge flag used by the ACPI-based PCI hotplug (ACPIPHP) code is BRIDGE_HAS_EJ0, but it is only used by the event handling function hotplug_event() and if that flag is set, the corresponding function flag FUNC_HAS_EJ0 is set as well, so that bridge flag is redundant. For this reason, drop BRIDGE_HAS_EJ0 and all code referring to it and since it is the only bridge flag defined, drop the flags field from struct acpiphp_bridge entirely. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-rw-r--r--drivers/pci/hotplug/acpiphp.h5
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c9
2 files changed, 0 insertions, 14 deletions
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index 4f10aec81b82..990fbfd110f1 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -83,8 +83,6 @@ struct acpiphp_bridge {
83 83
84 int nr_slots; 84 int nr_slots;
85 85
86 u32 flags;
87
88 /* This bus (host bridge) or Secondary bus (PCI-to-PCI bridge) */ 86 /* This bus (host bridge) or Secondary bus (PCI-to-PCI bridge) */
89 struct pci_bus *pci_bus; 87 struct pci_bus *pci_bus;
90 88
@@ -154,9 +152,6 @@ struct acpiphp_attention_info
154/* ACPI _STA method value (ignore bit 4; battery present) */ 152/* ACPI _STA method value (ignore bit 4; battery present) */
155#define ACPI_STA_ALL (0x0000000f) 153#define ACPI_STA_ALL (0x0000000f)
156 154
157/* bridge flags */
158#define BRIDGE_HAS_EJ0 (0x00000001)
159
160/* slot flags */ 155/* slot flags */
161 156
162#define SLOT_POWEREDON (0x00000001) 157#define SLOT_POWEREDON (0x00000001)
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index a251071b7d79..5d79175b9a09 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -986,9 +986,6 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
986 case ACPI_NOTIFY_EJECT_REQUEST: 986 case ACPI_NOTIFY_EJECT_REQUEST:
987 /* request device eject */ 987 /* request device eject */
988 dbg("%s: Device eject notify on %s\n", __func__, objname); 988 dbg("%s: Device eject notify on %s\n", __func__, objname);
989 if (bridge && !(bridge->flags & BRIDGE_HAS_EJ0))
990 break;
991
992 if (!(acpiphp_disable_slot(func->slot))) 989 if (!(acpiphp_disable_slot(func->slot)))
993 acpiphp_eject_slot(func->slot); 990 acpiphp_eject_slot(func->slot);
994 991
@@ -1125,12 +1122,6 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
1125 mutex_unlock(&acpiphp_context_lock); 1122 mutex_unlock(&acpiphp_context_lock);
1126 } 1123 }
1127 1124
1128 status = acpi_get_handle(bridge->handle, "_EJ0", &handle);
1129 if (ACPI_SUCCESS(status)) {
1130 dbg("found ejectable p2p bridge\n");
1131 bridge->flags |= BRIDGE_HAS_EJ0;
1132 }
1133
1134 /* must be added to the list prior to calling register_slot */ 1125 /* must be added to the list prior to calling register_slot */
1135 mutex_lock(&bridge_mutex); 1126 mutex_lock(&bridge_mutex);
1136 list_add(&bridge->list, &bridge_list); 1127 list_add(&bridge->list, &bridge_list);