ACPI HID's aren't limited to 7 characters. Don't check the length of the
HID passed in as an argument at all; callers are typically going to be sending us static strings anyway. Submitted by: Munehiro Matsuda <haro@tk.kubota.co.jp>
This commit is contained in:
parent
17a750ff36
commit
6715d70e6f
@ -644,13 +644,13 @@ acpi_MatchHid(device_t dev, char *hid)
|
||||
ACPI_DEVICE_INFO devinfo;
|
||||
ACPI_STATUS error;
|
||||
|
||||
if ((hid == NULL) || (strlen(hid) != 7))
|
||||
if (hid == NULL)
|
||||
return(FALSE);
|
||||
if ((h = acpi_get_handle(dev)) == NULL)
|
||||
return(FALSE);
|
||||
if ((error = AcpiGetObjectInfo(h, &devinfo)) != AE_OK)
|
||||
return(FALSE);
|
||||
if ((devinfo.Valid & ACPI_VALID_HID) && !strncmp(hid, devinfo.HardwareId, 7))
|
||||
if ((devinfo.Valid & ACPI_VALID_HID) && !strcmp(hid, devinfo.HardwareId))
|
||||
return(TRUE);
|
||||
return(FALSE);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user