diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-10-01 17:27:22 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-10-15 12:06:23 +0200 |
commit | 35009c807488ccd5a01cbf102033695e52794b68 (patch) | |
tree | 6a2775611a87926f1b74be76e1c519ec8cc5a0ff /include/acpi | |
parent | a814dcc269830c9dbb8a83731cfc6fc5dd787f8d (diff) | |
download | linux-35009c807488ccd5a01cbf102033695e52794b68.tar.gz linux-35009c807488ccd5a01cbf102033695e52794b68.tar.bz2 linux-35009c807488ccd5a01cbf102033695e52794b68.zip |
ACPI / utils: Introduce acpi_dev_hid_uid_match() helper
There are users outside of ACPI realm which reimplementing the comparator
function to check if the given device matches to given HID and UID.
For better utilization, introduce a helper for everyone to use.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 3f6fddeb7519..0c23fd0548d1 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -680,6 +680,8 @@ static inline bool acpi_device_can_poweroff(struct acpi_device *adev) adev->power.states[ACPI_STATE_D3_HOT].flags.explicit_set); } +bool acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2); + struct acpi_device * acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv); |