summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpi_apd.c
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2022-08-16 13:16:27 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-09-10 19:22:24 +0300
commit064d42d90e412936434fae7d49204d8055e5b0e5 (patch)
treed0236f7382ff409e6666e5f31242aeabb471fdac /drivers/acpi/acpi_apd.c
parent6bb057bfd9d509755349cd2a6ca5e5e6e6071304 (diff)
downloadlinux-064d42d90e412936434fae7d49204d8055e5b0e5.tar.xz
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 <heikki.krogerus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_apd.c')
-rw-r--r--drivers/acpi/acpi_apd.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index ad245bbd965e..3bbe2276cac7 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -60,12 +60,6 @@ static int acpi_apd_setup(struct apd_private_data *pdata)
}
#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)
{
@@ -82,8 +76,7 @@ static int fch_misc_setup(struct apd_private_data *pdata)
return -ENOMEM;
INIT_LIST_HEAD(&resource_list);
- ret = acpi_dev_get_resources(adev, &resource_list, misc_check_res,
- NULL);
+ ret = acpi_dev_get_memory_resources(adev, &resource_list);
if (ret < 0)
return -ENOENT;