diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-29 16:27:53 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-12-07 01:05:50 +0100 |
commit | bfecc2b3e34c6751343bacd317c4dfd1d695142c (patch) | |
tree | 935103a9c9abf8f15d5a4143907fca0799215267 | |
parent | ACPI / bind: Pass struct acpi_device pointer to acpi_bind_one() (diff) | |
download | linux-bfecc2b3e34c6751343bacd317c4dfd1d695142c.tar.xz linux-bfecc2b3e34c6751343bacd317c4dfd1d695142c.zip |
ACPI / bind: Move acpi_get_child() to drivers/ide/ide-acpi.c
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>
-rw-r--r-- | drivers/acpi/glue.c | 12 | ||||
-rw-r--r-- | drivers/ide/ide-acpi.c | 11 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 1 |
3 files changed, 11 insertions, 13 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 896351b9d483..0c789224d40d 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -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) diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 333d4053e727..b6940992a6ff 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c @@ -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 diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index a50898e67a68..7135fe3d6daa 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -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); |