aboutsummaryrefslogtreecommitdiff
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorPierre-Louis Bossart2024-05-28 14:29:34 -0500
committerMark Brown2024-06-10 12:48:20 +0100
commitb6212f9bf489daf9716aed0e8c4dc6a807ce839f (patch)
tree351787e84e0f72e7fa2347e63e80d870ce4e738f /drivers/soundwire
parent0b7e448119428e1dcb854abb5855f66966fb82dc (diff)
soundwire: slave: simplify code with acpi_get_local_u64_address()
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> Acked-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240528192936.16180-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/slave.c13
1 files 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;
-
- status = acpi_evaluate_integer(adev->handle,
- METHOD_NAME__ADR, NULL, &addr);
+ u64 addr;
+ int ret;
- 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);