Commit 064d42d9 authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Rafael J. Wysocki

ACPI: APD: Use the helper acpi_dev_get_memory_resources()

It removes the need to check the resource data type
separately.
Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 6bb057bf
...@@ -60,12 +60,6 @@ static int acpi_apd_setup(struct apd_private_data *pdata) ...@@ -60,12 +60,6 @@ static int acpi_apd_setup(struct apd_private_data *pdata)
} }
#ifdef CONFIG_X86_AMD_PLATFORM_DEVICE #ifdef CONFIG_X86_AMD_PLATFORM_DEVICE
static int misc_check_res(struct acpi_resource *ares, void *data)
{
struct resource res;
return !acpi_dev_resource_memory(ares, &res);
}
static int fch_misc_setup(struct apd_private_data *pdata) static int fch_misc_setup(struct apd_private_data *pdata)
{ {
...@@ -82,8 +76,7 @@ static int fch_misc_setup(struct apd_private_data *pdata) ...@@ -82,8 +76,7 @@ static int fch_misc_setup(struct apd_private_data *pdata)
return -ENOMEM; return -ENOMEM;
INIT_LIST_HEAD(&resource_list); INIT_LIST_HEAD(&resource_list);
ret = acpi_dev_get_resources(adev, &resource_list, misc_check_res, ret = acpi_dev_get_memory_resources(adev, &resource_list);
NULL);
if (ret < 0) if (ret < 0)
return -ENOENT; return -ENOENT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment