mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 06:43:09 +00:00
efi: dev-path-parser: use acpi_dev_uid_match() for matching _UID
Now that we have _UID matching support for integer types, we can use acpi_dev_uid_match() for it. Signed-off-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
5ecdb287be
commit
9e93507da2
@ -18,8 +18,6 @@ static long __init parse_acpi_path(const struct efi_dev_path *node,
|
||||
struct acpi_device *adev;
|
||||
struct device *phys_dev;
|
||||
char hid[ACPI_ID_LEN];
|
||||
u64 uid;
|
||||
int ret;
|
||||
|
||||
if (node->header.length != 12)
|
||||
return -EINVAL;
|
||||
@ -31,10 +29,9 @@ static long __init parse_acpi_path(const struct efi_dev_path *node,
|
||||
node->acpi.hid >> 16);
|
||||
|
||||
for_each_acpi_dev_match(adev, hid, NULL, -1) {
|
||||
ret = acpi_dev_uid_to_integer(adev, &uid);
|
||||
if (ret == 0 && node->acpi.uid == uid)
|
||||
if (acpi_dev_uid_match(adev, node->acpi.uid))
|
||||
break;
|
||||
if (ret == -ENODATA && node->acpi.uid == 0)
|
||||
if (!acpi_device_uid(adev) && node->acpi.uid == 0)
|
||||
break;
|
||||
}
|
||||
if (!adev)
|
||||
|
Loading…
Reference in New Issue
Block a user