Skip to content

Commit

Permalink
ACPI / bind: Move acpi_get_child() to drivers/ide/ide-acpi.c
Browse files Browse the repository at this point in the history
Since drivers/ide/ide-acpi.c is the only remaining user of
acpi_get_child(), move that function into that file as a static
routine.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Rafael J. Wysocki committed Dec 7, 2013
1 parent 24dee1f commit bfecc2b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
12 changes: 0 additions & 12 deletions drivers/acpi/glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,6 @@ struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
}
EXPORT_SYMBOL_GPL(acpi_find_child_device);

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, false);
return adev ? adev->handle : NULL;
}
EXPORT_SYMBOL_GPL(acpi_get_child);

static void acpi_physnode_link_name(char *buf, unsigned int node_id)
{
if (node_id > 0)
Expand Down
11 changes: 11 additions & 0 deletions drivers/ide/ide-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ bool ide_port_acpi(ide_hwif_t *hwif)
return ide_noacpi == 0 && hwif->acpidata;
}

static 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, false);
return adev ? adev->handle : NULL;
}

/**
* ide_get_dev_handle - finds acpi_handle and PCI device.function
* @dev: device to locate
Expand Down
1 change: 0 additions & 1 deletion include/acpi/acpi_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,6 @@ struct acpi_pci_root {

struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
u64 address, bool check_children);
acpi_handle acpi_get_child(acpi_handle handle, 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 bfecc2b

Please sign in to comment.