OSDN Git Service

soundwire: Replace acpi_bus_get_device()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 26 Jan 2022 19:50:39 +0000 (20:50 +0100)
committerVinod Koul <vkoul@kernel.org>
Thu, 10 Feb 2022 13:48:19 +0000 (19:18 +0530)
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>
Link: https://lore.kernel.org/r/3173256.44csPzL39Z@kreacher
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/intel_init.c

index d998077..824f4f3 100644 (file)
@@ -180,7 +180,8 @@ static struct sdw_intel_ctx
        if (!res)
                return NULL;
 
-       if (acpi_bus_get_device(res->handle, &adev))
+       adev = acpi_fetch_acpi_dev(res->handle);
+       if (!adev)
                return NULL;
 
        if (!res->count)
@@ -294,13 +295,13 @@ err:
 static int
 sdw_intel_startup_controller(struct sdw_intel_ctx *ctx)
 {
-       struct acpi_device *adev;
+       struct acpi_device *adev = acpi_fetch_acpi_dev(ctx->handle);
        struct sdw_intel_link_dev *ldev;
        u32 caps;
        u32 link_mask;
        int i;
 
-       if (acpi_bus_get_device(ctx->handle, &adev))
+       if (!adev)
                return -EINVAL;
 
        /* Check SNDWLCAP.LCOUNT */