Skip to content

Commit 6fdba3d

Browse files
raagjadavrafaeljw
authored andcommitted
perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and _UID
Convert manual _UID references to use the standard ACPI helpers. Signed-off-by: Raag Jadav <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 45f5671 commit 6fdba3d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/perf/arm_cspmu/arm_cspmu.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ static int arm_cspmu_request_irq(struct arm_cspmu *cspmu)
10611061

10621062
static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid)
10631063
{
1064-
u32 acpi_uid;
1064+
u64 acpi_uid;
10651065
struct device *cpu_dev;
10661066
struct acpi_device *acpi_dev;
10671067

@@ -1071,10 +1071,8 @@ static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid)
10711071

10721072
acpi_dev = ACPI_COMPANION(cpu_dev);
10731073
while (acpi_dev) {
1074-
if (!strcmp(acpi_device_hid(acpi_dev),
1075-
ACPI_PROCESSOR_CONTAINER_HID) &&
1076-
!kstrtouint(acpi_device_uid(acpi_dev), 0, &acpi_uid) &&
1077-
acpi_uid == container_uid)
1074+
if (acpi_dev_hid_uid_match(acpi_dev, ACPI_PROCESSOR_CONTAINER_HID, NULL) &&
1075+
!acpi_dev_uid_to_integer(acpi_dev, &acpi_uid) && acpi_uid == container_uid)
10781076
return 0;
10791077

10801078
acpi_dev = acpi_dev_parent(acpi_dev);

0 commit comments

Comments
 (0)