aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/acpiphp.h')
-rw-r--r--drivers/pci/hotplug/acpiphp.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index 373c7aa3b4a6..d7c1fc9712ad 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -116,12 +116,17 @@ struct acpiphp_func {
116}; 116};
117 117
118struct acpiphp_context { 118struct acpiphp_context {
119 struct acpi_hotplug_context hp;
119 struct acpiphp_func func; 120 struct acpiphp_func func;
120 struct acpi_device *adev;
121 struct acpiphp_bridge *bridge; 121 struct acpiphp_bridge *bridge;
122 unsigned int refcount; 122 unsigned int refcount;
123}; 123};
124 124
125static inline struct acpiphp_context *to_acpiphp_context(struct acpi_hotplug_context *hp)
126{
127 return container_of(hp, struct acpiphp_context, hp);
128}
129
125static inline struct acpiphp_context *func_to_context(struct acpiphp_func *func) 130static inline struct acpiphp_context *func_to_context(struct acpiphp_func *func)
126{ 131{
127 return container_of(func, struct acpiphp_context, func); 132 return container_of(func, struct acpiphp_context, func);
@@ -129,7 +134,7 @@ static inline struct acpiphp_context *func_to_context(struct acpiphp_func *func)
129 134
130static inline struct acpi_device *func_to_acpi_device(struct acpiphp_func *func) 135static inline struct acpi_device *func_to_acpi_device(struct acpiphp_func *func)
131{ 136{
132 return func_to_context(func)->adev; 137 return func_to_context(func)->hp.self;
133} 138}
134 139
135static inline acpi_handle func_to_handle(struct acpiphp_func *func) 140static inline acpi_handle func_to_handle(struct acpiphp_func *func)