提交 8733729e 编写于 作者: R Rafael J. Wysocki 提交者: Vinod Koul

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: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/3173256.44csPzL39Z@kreacherSigned-off-by: NVinod Koul <vkoul@kernel.org>
上级 3957db3a
...@@ -180,7 +180,8 @@ static struct sdw_intel_ctx ...@@ -180,7 +180,8 @@ static struct sdw_intel_ctx
if (!res) if (!res)
return NULL; return NULL;
if (acpi_bus_get_device(res->handle, &adev)) adev = acpi_fetch_acpi_dev(res->handle);
if (!adev)
return NULL; return NULL;
if (!res->count) if (!res->count)
...@@ -294,13 +295,13 @@ static struct sdw_intel_ctx ...@@ -294,13 +295,13 @@ static struct sdw_intel_ctx
static int static int
sdw_intel_startup_controller(struct sdw_intel_ctx *ctx) 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; struct sdw_intel_link_dev *ldev;
u32 caps; u32 caps;
u32 link_mask; u32 link_mask;
int i; int i;
if (acpi_bus_get_device(ctx->handle, &adev)) if (!adev)
return -EINVAL; return -EINVAL;
/* Check SNDWLCAP.LCOUNT */ /* Check SNDWLCAP.LCOUNT */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册