Skip to content

Commit

Permalink
ACPI / bind: Redefine acpi_get_child()
Browse files Browse the repository at this point in the history
Since acpi_get_child() is the only user of acpi_find_child() now,
drop the static inline definition of the former and redefine the
latter as new acpi_get_child().

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
  • Loading branch information
Rafael J. Wysocki committed Dec 7, 2013
1 parent 5ce79d2 commit 11dcc75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions drivers/acpi/glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,17 @@ struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
return ret;
}

acpi_handle acpi_find_child(acpi_handle handle, u64 addr, bool is_bridge)
acpi_handle acpi_get_child(acpi_handle handle, u64 addr)
{
struct acpi_device *adev;

if (!handle || acpi_bus_get_device(handle, &adev))
return NULL;

adev = acpi_find_child_device(adev, addr, is_bridge);
adev = acpi_find_child_device(adev, addr, false);
return adev ? adev->handle : NULL;
}
EXPORT_SYMBOL_GPL(acpi_find_child);
EXPORT_SYMBOL_GPL(acpi_get_child);

static void acpi_physnode_link_name(char *buf, unsigned int node_id)
{
Expand Down
6 changes: 1 addition & 5 deletions include/acpi/acpi_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,7 @@ struct acpi_pci_root {

struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
u64 address, bool check_children);
acpi_handle acpi_find_child(acpi_handle, u64, bool);
static inline acpi_handle acpi_get_child(acpi_handle handle, u64 addr)
{
return acpi_find_child(handle, addr, false);
}
acpi_handle acpi_get_child(acpi_handle handle, u64 addr);
void acpi_preset_companion(struct device *dev, acpi_handle parent, u64 addr);
int acpi_is_root_bridge(acpi_handle);
struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
Expand Down

0 comments on commit 11dcc75

Please sign in to comment.