diff mbox series

soundwire: Replace acpi_bus_get_device()

Message ID 3173256.44csPzL39Z@kreacher
State New
Headers show
Series soundwire: Replace acpi_bus_get_device() | expand

Commit Message

Rafael J. Wysocki Jan. 26, 2022, 7:50 p.m. UTC
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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>
---
 drivers/soundwire/intel_init.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Vinod Koul Feb. 10, 2022, 1:49 p.m. UTC | #1
On 26-01-22, 20:50, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Replace acpi_bus_get_device() that is going to be dropped with
> acpi_fetch_acpi_dev().
> 
> No intentional functional impact.

Applied, thanks
diff mbox series

Patch

Index: linux-pm/drivers/soundwire/intel_init.c
===================================================================
--- linux-pm.orig/drivers/soundwire/intel_init.c
+++ linux-pm/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 */