diff options
author | Heikki Krogerus | 2022-09-07 13:30:07 +0300 |
---|---|---|
committer | Rafael J. Wysocki | 2022-09-10 18:22:38 +0200 |
commit | 1538dc8c1561f0de4ba57a69e2a421a1a3951618 (patch) | |
tree | c1d0795db0e66aa5e79e88fc52c9d2250d81fb14 /drivers/usb | |
parent | e12dee3736731e24b1e7367f87d66ac0fcd73ce7 (diff) |
usb: typec: intel_pmc_mux: Use the helper acpi_dev_get_memory_resources()
It removes the need to check the resource data type
separately.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/typec/mux/intel_pmc_mux.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c index a8e273fe204a..e1f4df7238bf 100644 --- a/drivers/usb/typec/mux/intel_pmc_mux.c +++ b/drivers/usb/typec/mux/intel_pmc_mux.c @@ -569,15 +569,6 @@ err_unregister_switch: 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 */ @@ -611,7 +602,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; |