perf: Replace acpi_bus_get_device()

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2217547

commit 602c873eb52e5717057eb0971258c8eb7440c4a5
Author: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Date: Tue, 1 Feb 2022 20:10:01 +0100

    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>

Signed-off-by: Mark Salter <msalter@redhat.com>
This commit is contained in:
Mark Salter 2023-06-27 08:05:08 -04:00
parent 4f37f628b8
commit ce10615203
2 changed files with 4 additions and 8 deletions

View File

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

View File

@ -1549,14 +1549,12 @@ static const struct acpi_device_id *xgene_pmu_acpi_match_type(
static acpi_status acpi_pmu_dev_add(acpi_handle handle, u32 level,
void *data, void **return_value)
{
struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
const struct acpi_device_id *acpi_id;
struct xgene_pmu *xgene_pmu = data;
struct xgene_pmu_dev_ctx *ctx;
struct acpi_device *adev;
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;
acpi_id = xgene_pmu_acpi_match_type(xgene_pmu_acpi_type_match, adev);