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:
msmith 2000-12-05 00:19:10 +00:00
parent 17a750ff36
commit 6715d70e6f

View File

@ -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);
}