Skip to content

Commit 064d42d

Browse files
Heikki Krogerusrafaeljw
authored andcommitted
ACPI: APD: 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 6bb057b commit 064d42d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/acpi/acpi_apd.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ static int acpi_apd_setup(struct apd_private_data *pdata)
6060
}
6161

6262
#ifdef CONFIG_X86_AMD_PLATFORM_DEVICE
63-
static int misc_check_res(struct acpi_resource *ares, void *data)
64-
{
65-
struct resource res;
66-
67-
return !acpi_dev_resource_memory(ares, &res);
68-
}
6963

7064
static int fch_misc_setup(struct apd_private_data *pdata)
7165
{
@@ -82,8 +76,7 @@ static int fch_misc_setup(struct apd_private_data *pdata)
8276
return -ENOMEM;
8377

8478
INIT_LIST_HEAD(&resource_list);
85-
ret = acpi_dev_get_resources(adev, &resource_list, misc_check_res,
86-
NULL);
79+
ret = acpi_dev_get_memory_resources(adev, &resource_list);
8780
if (ret < 0)
8881
return -ENOENT;
8982

0 commit comments

Comments
 (0)