Skip to content

Commit 840baca

Browse files
Heikki Krogerusrafaeljw
authored andcommitted
ACPI: LPSS: 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 064d42d commit 840baca

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/acpi/acpi_lpss.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,6 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
392392

393393
#ifdef CONFIG_X86_INTEL_LPSS
394394

395-
static int is_memory(struct acpi_resource *res, void *not_used)
396-
{
397-
struct resource r;
398-
399-
return !acpi_dev_resource_memory(res, &r);
400-
}
401-
402395
/* LPSS main clock device. */
403396
static struct platform_device *lpss_clk_dev;
404397

@@ -659,7 +652,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
659652
return -ENOMEM;
660653

661654
INIT_LIST_HEAD(&resource_list);
662-
ret = acpi_dev_get_resources(adev, &resource_list, is_memory, NULL);
655+
ret = acpi_dev_get_memory_resources(adev, &resource_list);
663656
if (ret < 0)
664657
goto err_out;
665658

0 commit comments

Comments
 (0)