diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-29 10:27:53 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-12-06 19:05:50 -0500 |
commit | bfecc2b3e34c6751343bacd317c4dfd1d695142c (patch) | |
tree | 935103a9c9abf8f15d5a4143907fca0799215267 /drivers/ide/ide-acpi.c | |
parent | 24dee1fc99fd6d38fc859d7f6dda1dab21493bef (diff) |
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>
Diffstat (limited to 'drivers/ide/ide-acpi.c')
-rw-r--r-- | drivers/ide/ide-acpi.c | 11 |
1 files changed, 11 insertions, 0 deletions
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) | |||
97 | return ide_noacpi == 0 && hwif->acpidata; | 97 | return ide_noacpi == 0 && hwif->acpidata; |
98 | } | 98 | } |
99 | 99 | ||
100 | static acpi_handle acpi_get_child(acpi_handle handle, u64 addr) | ||
101 | { | ||
102 | struct acpi_device *adev; | ||
103 | |||
104 | if (!handle || acpi_bus_get_device(handle, &adev)) | ||
105 | return NULL; | ||
106 | |||
107 | adev = acpi_find_child_device(adev, addr, false); | ||
108 | return adev ? adev->handle : NULL; | ||
109 | } | ||
110 | |||
100 | /** | 111 | /** |
101 | * ide_get_dev_handle - finds acpi_handle and PCI device.function | 112 | * ide_get_dev_handle - finds acpi_handle and PCI device.function |
102 | * @dev: device to locate | 113 | * @dev: device to locate |