diff options
Diffstat (limited to 'drivers/pci/hotplug/acpiphp.h')
-rw-r--r-- | drivers/pci/hotplug/acpiphp.h | 9 |
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 | ||
118 | struct acpiphp_context { | 118 | struct 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 | ||
125 | static inline struct acpiphp_context *to_acpiphp_context(struct acpi_hotplug_context *hp) | ||
126 | { | ||
127 | return container_of(hp, struct acpiphp_context, hp); | ||
128 | } | ||
129 | |||
125 | static inline struct acpiphp_context *func_to_context(struct acpiphp_func *func) | 130 | static 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 | ||
130 | static inline struct acpi_device *func_to_acpi_device(struct acpiphp_func *func) | 135 | static 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 | ||
135 | static inline acpi_handle func_to_handle(struct acpiphp_func *func) | 140 | static inline acpi_handle func_to_handle(struct acpiphp_func *func) |