summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-13 23:27:25 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-23 04:00:23 +0200
commit5a3bc573ae32a71bb9e307812d4de1bdcab6b9fb (patch)
treea0d437fdef258deae5c45cf6430d1df7385a9f6d /drivers/pci/hotplug/acpiphp.h
parentACPI / hotplug / PCI: Embed function struct into struct acpiphp_context (diff)
downloadlinux-5a3bc573ae32a71bb9e307812d4de1bdcab6b9fb.tar.xz
linux-5a3bc573ae32a71bb9e307812d4de1bdcab6b9fb.zip
ACPI / hotplug / PCI: Drop handle field from struct acpiphp_func
The ACPI handle stored in struct acpiphp_func is also stored in the struct acpiphp_context object containing it and it is trivial to get from a struct acpiphp_func pointer to the handle field of the outer struct acpiphp_context. Hence, the handle field of struct acpiphp_func is redundant, so drop it and provide a helper function, func_to_handle(), allowing it users to get the ACPI handle for the given struct acpiphp_func pointer. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp.h')
-rw-r--r--drivers/pci/hotplug/acpiphp.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index 31c84bdd2bef..dbb94258da57 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -119,7 +119,6 @@ struct acpiphp_func {
struct acpiphp_slot *slot; /* parent */
struct list_head sibling;
- acpi_handle handle;
u8 function; /* pci function# */
u32 flags; /* see below */
@@ -137,6 +136,11 @@ static inline struct acpiphp_context *func_to_context(struct acpiphp_func *func)
return container_of(func, struct acpiphp_context, func);
}
+static inline acpi_handle func_to_handle(struct acpiphp_func *func)
+{
+ return func_to_context(func)->handle;
+}
+
/*
* struct acpiphp_attention_info - device specific attention registration
*