Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: linux-sound@vger.kernel.org
Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org,
	rafael@kernel.org, vkoul@kernel.org,
	andriy.shevchenko@linux.intel.com,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
	"Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
	"Bard Liao" <yung-chuan.liao@linux.intel.com>,
	"Sanyog Kale" <sanyog.r.kale@intel.com>,
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 2/3] soundwire: slave: simplify code with acpi_get_local_u64_address()
Date: Tue, 28 May 2024 14:29:34 -0500	[thread overview]
Message-ID: <20240528192936.16180-3-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20240528192936.16180-1-pierre-louis.bossart@linux.intel.com>

Now we have a helper so there's no need to open-code.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 drivers/soundwire/slave.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c
index 9963b92eb505..f1a4df6cfebd 100644
--- a/drivers/soundwire/slave.c
+++ b/drivers/soundwire/slave.c
@@ -97,18 +97,13 @@ static bool find_slave(struct sdw_bus *bus,
 		       struct acpi_device *adev,
 		       struct sdw_slave_id *id)
 {
-	u64 addr;
 	unsigned int link_id;
-	acpi_status status;
+	u64 addr;
+	int ret;
 
-	status = acpi_evaluate_integer(adev->handle,
-				       METHOD_NAME__ADR, NULL, &addr);
-
-	if (ACPI_FAILURE(status)) {
-		dev_err(bus->dev, "_ADR resolution failed: %x\n",
-			status);
+	ret = acpi_get_local_u64_address(adev->handle, &addr);
+	if (ret < 0)
 		return false;
-	}
 
 	if (bus->ops->override_adr)
 		addr = bus->ops->override_adr(bus, addr);
-- 
2.43.0


  parent reply	other threads:[~2024-05-28 19:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28 19:29 [PATCH 0/3] ACPI/ALSA/soundwire: add acpi_get_local_u64_address() helper Pierre-Louis Bossart
2024-05-28 19:29 ` [PATCH 1/3] ACPI: utils: introduce acpi_get_local_u64_address() Pierre-Louis Bossart
2024-06-07 18:51   ` Rafael J. Wysocki
2024-06-07 20:33     ` Pierre-Louis Bossart
2024-06-07 21:59       ` Mark Brown
2024-06-08 11:58       ` Rafael J. Wysocki
2024-05-28 19:29 ` Pierre-Louis Bossart [this message]
2024-06-02 14:49   ` [PATCH 2/3] soundwire: slave: simplify code with acpi_get_local_u64_address() Vinod Koul
2024-05-28 19:29 ` [PATCH 3/3] ALSA: hda: intel-sdw-acpi: use acpi_get_local_u64_address() Pierre-Louis Bossart
2024-05-29 14:32 ` [PATCH 0/3] ACPI/ALSA/soundwire: add acpi_get_local_u64_address() helper Takashi Iwai
2024-05-30 15:14 ` Andy Shevchenko
2024-06-11 10:19 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240528192936.16180-3-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=rafael@kernel.org \
    --cc=sanyog.r.kale@intel.com \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox