diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-01-05 19:09:33 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-01-10 02:41:43 +0300 |
commit | 67dcf8a3e06582cb6b02952335b5612beb97889f (patch) | |
tree | 3f4eaa7009cdf208646d0d7362ec8773c1ba6bf6 /include/acpi/acpi_bus.h | |
parent | b2cd1df66037e7c4697c7e40496bf7e4a5e16a2d (diff) | |
download | linux-67dcf8a3e06582cb6b02952335b5612beb97889f.tar.xz |
ACPI: utils: Introduce acpi_dev_get_first_match_name()
Sometimes the user wants to have device name of the match rather than
just checking if device present or not. To make life easier for such
users introduce acpi_dev_get_first_match_name() helper based on code
for acpi_dev_present().
For example, GPIO driver for Intel Merrifield needs to know the device
name of pin control to be able to apply GPIO mapping table to the proper
device.
To be more consistent with the purpose rename
struct acpi_dev_present_info -> struct acpi_dev_match_info
acpi_dev_present_cb() -> acpi_dev_match_cb()
in the utils.c file.
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r-- | include/acpi/acpi_bus.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 79287629c888..c9608b0b80c6 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -91,6 +91,9 @@ acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev, bool acpi_dev_found(const char *hid); bool acpi_dev_present(const char *hid, const char *uid, s64 hrv); +const char * +acpi_dev_get_first_match_name(const char *hid, const char *uid, s64 hrv); + #ifdef CONFIG_ACPI #include <linux/proc_fs.h> |