Skip to content

Commit 1538dc8

Browse files
Heikki Krogerusrafaeljw
authored andcommitted
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 <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent e12dee3 commit 1538dc8

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/usb/typec/mux/intel_pmc_mux.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -569,15 +569,6 @@ static int pmc_usb_register_port(struct pmc_usb *pmc, int index,
569569
return ret;
570570
}
571571

572-
static int is_memory(struct acpi_resource *res, void *data)
573-
{
574-
struct resource_win win = {};
575-
struct resource *r = &win.res;
576-
577-
return !(acpi_dev_resource_memory(res, r) ||
578-
acpi_dev_resource_address_space(res, &win));
579-
}
580-
581572
/* IOM ACPI IDs and IOM_PORT_STATUS_OFFSET */
582573
static const struct acpi_device_id iom_acpi_ids[] = {
583574
/* TigerLake */
@@ -611,7 +602,7 @@ static int pmc_usb_probe_iom(struct pmc_usb *pmc)
611602
return -ENODEV;
612603

613604
INIT_LIST_HEAD(&resource_list);
614-
ret = acpi_dev_get_resources(adev, &resource_list, is_memory, NULL);
605+
ret = acpi_dev_get_memory_resources(adev, &resource_list);
615606
if (ret < 0)
616607
return ret;
617608

0 commit comments

Comments
 (0)