diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-28 17:58:28 -0500 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-12-06 19:05:49 -0500 |
| commit | 9c5ad36d987a1b06f6b0b9dc7bc61a45d277455d (patch) | |
| tree | f62910cb67ab6912ae1d753a0940f76bb3f47e00 /include/acpi/acpi_bus.h | |
| parent | 11dcc75dba5bf8b69c4612de10e366c4e04cb123 (diff) | |
ACPI / bind: Redefine acpi_preset_companion()
Modify acpi_preset_companion() to take a struct acpi_device pointer
instead of an ACPI handle as its second argument and redefine it as
a static inline wrapper around ACPI_COMPANION_SET() passing the
return value of acpi_find_child_device() directly as the second
argument to it. Update its users to pass struct acpi_device
pointers instead of ACPI handles to it.
This allows some unnecessary acpi_bus_get_device() calls to be
avoided.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com>
Tested-by: Aaron Lu <aaron.lu@intel.com> # for ATA binding
Diffstat (limited to 'include/acpi/acpi_bus.h')
| -rw-r--r-- | include/acpi/acpi_bus.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index a1a48f27933a..918eaab892e1 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
| @@ -435,7 +435,6 @@ struct acpi_pci_root { | |||
| 435 | struct acpi_device *acpi_find_child_device(struct acpi_device *parent, | 435 | struct acpi_device *acpi_find_child_device(struct acpi_device *parent, |
| 436 | u64 address, bool check_children); | 436 | u64 address, bool check_children); |
| 437 | acpi_handle acpi_get_child(acpi_handle handle, u64 addr); | 437 | acpi_handle acpi_get_child(acpi_handle handle, u64 addr); |
| 438 | void acpi_preset_companion(struct device *dev, acpi_handle parent, u64 addr); | ||
| 439 | int acpi_is_root_bridge(acpi_handle); | 438 | int acpi_is_root_bridge(acpi_handle); |
| 440 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); | 439 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); |
| 441 | 440 | ||
