5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alban Bedel [ Upstream commit 4825287f6d2346e9273f35a928d1ef40e68bc58b ] ACPI resources can use relative path when pointing to other resources. This didn't work with SPISerialBus resources because the device defining the resource was not passed to acpi_get_handle(). Pass the ACPI device handle through the lookup context to also allow for relative paths. Signed-off-by: Alban Bedel Link: https://patch.msgid.link/20261001153507.2011806-1-alban.bedel@lht.dlh.de Signed-off-by: Mark Brown Stable-dep-of: 2d0953ab69d3 ("spi: acpi: only look up the IRQ of confirmed SPI devices") Signed-off-by: Sasha Levin --- drivers/spi/spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index b662a9a3961ab..56505af80ba80 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2272,6 +2272,7 @@ EXPORT_SYMBOL_GPL(spi_new_ancillary_device); #ifdef CONFIG_ACPI struct acpi_spi_lookup { struct spi_controller *ctlr; + acpi_handle device_handle; u32 max_speed_hz; u32 mode; int irq; @@ -2328,7 +2329,7 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data) if (lookup->index != -1 && lookup->n++ != lookup->index) return 1; - status = acpi_get_handle(NULL, + status = acpi_get_handle(lookup->device_handle, sb->resource_source.string_ptr, &parent_handle); @@ -2419,6 +2420,7 @@ struct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr, return ERR_PTR(-EINVAL); lookup.ctlr = ctlr; + lookup.device_handle = acpi_device_handle(adev); lookup.irq = -1; lookup.index = index; lookup.n = 0; -- 2.53.0