Skip to content

Commit 9e93507

Browse files
raagjadavrafaeljw
authored andcommitted
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>
1 parent 5ecdb28 commit 9e93507

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

drivers/firmware/efi/dev-path-parser.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ static long __init parse_acpi_path(const struct efi_dev_path *node,
1818
struct acpi_device *adev;
1919
struct device *phys_dev;
2020
char hid[ACPI_ID_LEN];
21-
u64 uid;
22-
int ret;
2321

2422
if (node->header.length != 12)
2523
return -EINVAL;
@@ -31,10 +29,9 @@ static long __init parse_acpi_path(const struct efi_dev_path *node,
3129
node->acpi.hid >> 16);
3230

3331
for_each_acpi_dev_match(adev, hid, NULL, -1) {
34-
ret = acpi_dev_uid_to_integer(adev, &uid);
35-
if (ret == 0 && node->acpi.uid == uid)
32+
if (acpi_dev_uid_match(adev, node->acpi.uid))
3633
break;
37-
if (ret == -ENODATA && node->acpi.uid == 0)
34+
if (!acpi_device_uid(adev) && node->acpi.uid == 0)
3835
break;
3936
}
4037
if (!adev)

0 commit comments

Comments
 (0)