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>
This commit is contained in:
Pierre-Louis Bossart 2024-05-28 14:29:34 -05:00 committed by Mark Brown
parent 0b7e448119
commit b6212f9bf4
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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);