diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-02-01 20:10:01 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2022-02-08 16:14:53 +0100 |
commit | 602c873eb52e5717057eb0971258c8eb7440c4a5 (patch) | |
tree | 78e59c4c40b0c7c0796d124b1d590c4d3803ee27 /drivers/perf/thunderx2_pmu.c | |
parent | perf/marvell_cn10k: Fix unused variable warning when W=1 and CONFIG_OF=n (diff) | |
download | linux-602c873eb52e5717057eb0971258c8eb7440c4a5.tar.xz linux-602c873eb52e5717057eb0971258c8eb7440c4a5.zip |
perf: Replace acpi_bus_get_device()
Replace acpi_bus_get_device() that is going to be dropped with
acpi_fetch_acpi_dev().
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/10025610.nUPlyArG6x@kreacher
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/thunderx2_pmu.c')
-rw-r--r-- | drivers/perf/thunderx2_pmu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/perf/thunderx2_pmu.c b/drivers/perf/thunderx2_pmu.c index 05378c0fd8f3..1edb9c03704f 100644 --- a/drivers/perf/thunderx2_pmu.c +++ b/drivers/perf/thunderx2_pmu.c @@ -887,13 +887,11 @@ static struct tx2_uncore_pmu *tx2_uncore_pmu_init_dev(struct device *dev, static acpi_status tx2_uncore_pmu_add(acpi_handle handle, u32 level, void *data, void **return_value) { + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); struct tx2_uncore_pmu *tx2_pmu; - struct acpi_device *adev; enum tx2_uncore_type type; - if (acpi_bus_get_device(handle, &adev)) - return AE_OK; - if (acpi_bus_get_status(adev) || !adev->status.present) + if (!adev || acpi_bus_get_status(adev) || !adev->status.present) return AE_OK; type = get_tx2_pmu_type(adev); |