aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRaag Jadav <[email protected]>2023-11-23 15:36:13 +0530
committerRafael J. Wysocki <[email protected]>2023-12-06 18:02:37 +0100
commit57b8543ceee82ea72be1745a6dc3a9111d55a151 (patch)
treef9acdbd8578f36e70d7bb65fd4667a0efc509348 /include/linux
parent33cc938e65a98f1d29d0a18403dbbee050dcad9a (diff)
ACPI: bus: update acpi_dev_uid_match() to support multiple types
According to the ACPI specification, a _UID object can evaluate to either a numeric value or a string. Update acpi_dev_uid_match() to support _UID matching for both integer and string types. Suggested-by: Mika Westerberg <[email protected]> Signed-off-by: Raag Jadav <[email protected]> [ rjw: Rename auxiliary macros, relocate kerneldoc comment ] Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 4db54e928b36..2abe81f074de 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -756,6 +756,9 @@ const char *acpi_get_subsystem_id(acpi_handle handle);
#define ACPI_HANDLE(dev) (NULL)
#define ACPI_HANDLE_FWNODE(fwnode) (NULL)
+/* Get rid of the -Wunused-variable for adev */
+#define acpi_dev_uid_match(adev, uid2) (adev && false)
+
#include <acpi/acpi_numa.h>
struct fwnode_handle;
@@ -772,11 +775,6 @@ static inline bool acpi_dev_present(const char *hid, const char *uid, s64 hrv)
struct acpi_device;
-static inline bool acpi_dev_uid_match(struct acpi_device *adev, const char *uid2)
-{
- return false;
-}
-
static inline bool
acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2)
{