This is a note to let you know that I've just added the patch titled usb: typec: intel_pmc_mux: Use the helper acpi_dev_get_memory_resources() to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-typec-intel_pmc_mux-use-the-helper-acpi_dev_get_.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 7151997b164ade0f8a1b32204394d4c2c224a6d0 Author: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> Date: Wed Sep 7 13:30:07 2022 +0300 usb: typec: intel_pmc_mux: Use the helper acpi_dev_get_memory_resources() [ Upstream commit 1538dc8c1561f0de4ba57a69e2a421a1a3951618 ] It removes the need to check the resource data type separately. Signed-off-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> Stable-dep-of: c3194949ae8f ("usb: typec: intel_pmc_mux: Don't leak the ACPI device reference count") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c index a2f5cfdcf02ac..8af60f0720435 100644 --- a/drivers/usb/typec/mux/intel_pmc_mux.c +++ b/drivers/usb/typec/mux/intel_pmc_mux.c @@ -563,15 +563,6 @@ static int pmc_usb_register_port(struct pmc_usb *pmc, int index, return ret; } -static int is_memory(struct acpi_resource *res, void *data) -{ - struct resource_win win = {}; - struct resource *r = &win.res; - - return !(acpi_dev_resource_memory(res, r) || - acpi_dev_resource_address_space(res, &win)); -} - /* IOM ACPI IDs and IOM_PORT_STATUS_OFFSET */ static const struct acpi_device_id iom_acpi_ids[] = { /* TigerLake */ @@ -605,7 +596,7 @@ static int pmc_usb_probe_iom(struct pmc_usb *pmc) return -ENODEV; INIT_LIST_HEAD(&resource_list); - ret = acpi_dev_get_resources(adev, &resource_list, is_memory, NULL); + ret = acpi_dev_get_memory_resources(adev, &resource_list); if (ret < 0) return ret;