Message ID | 20211018214837.1830678-1-alex.hung@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | acpi: uniqueid: skip comparison of _HID and _CID of the same device | expand |
On 10/19/21 5:48 AM, Alex Hung wrote: > Buglink: https://bugs.launchpad.net/bugs/1947633 > > Signed-off-by: Alex Hung <alex.hung@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; > > Acked-by: Ivan Hu <ivan.hu@canonical.com>
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;
Buglink: https://bugs.launchpad.net/bugs/1947633 Signed-off-by: Alex Hung <alex.hung@canonical.com> --- src/acpi/uniqueid/uniqueid.c | 4 ++++ 1 file changed, 4 insertions(+)