mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
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:
parent
0b7e448119
commit
b6212f9bf4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user