[PATCH] acpi: uniqueid: skip comparison of _HID and _CID of the same device

Alex Hung alex.hung at canonical.com
Mon Oct 18 21:48:37 UTC 2021


Buglink: https://bugs.launchpad.net/bugs/1947633

Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
 src/acpi/uniqueid/uniqueid.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/acpi/uniqueid/uniqueid.c b/src/acpi/uniqueid/uniqueid.c
index 57a16092..f745dfe5 100644
--- a/src/acpi/uniqueid/uniqueid.c
+++ b/src/acpi/uniqueid/uniqueid.c
@@ -108,6 +108,10 @@ static bool is_uniqueid_equal(acpi_ids *obj1, acpi_ids *obj2)
 {
 	bool hid_match = false;
 
+	/* _HID and _CID are in the same device */
+	if (!strncmp(obj1->hid_name, obj2->hid_name, strlen(obj1->hid_name) - 4))
+		return false;
+
 	if (obj1 == NULL || obj2 == NULL)
 		return false;
 
-- 
2.33.1




More information about the fwts-devel mailing list