summaryrefslogtreecommitdiff
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-01-26 20:50:39 +0100
committerVinod Koul <vkoul@kernel.org>2022-02-10 19:18:19 +0530
commit8733729e63001942a40710497bfce39e957d10da (patch)
treeb2065b5b18c82877d7a770dabb81a50d78aa9ae3 /drivers/soundwire
parent3957db3ae3dae6f8b8168791f154567fe49e1fd7 (diff)
soundwire: 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> Link: https://lore.kernel.org/r/3173256.44csPzL39Z@kreacher Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/intel_init.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c
index d99807765dfe..824f4f32d4dc 100644
--- a/drivers/soundwire/intel_init.c
+++ b/drivers/soundwire/intel_init.c
@@ -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 */