Commit 840baca4 authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Rafael J. Wysocki
Browse files

ACPI: LPSS: 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 064d42d9
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -392,13 +392,6 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {

#ifdef CONFIG_X86_INTEL_LPSS

static int is_memory(struct acpi_resource *res, void *not_used)
{
	struct resource r;

	return !acpi_dev_resource_memory(res, &r);
}

/* LPSS main clock device. */
static struct platform_device *lpss_clk_dev;

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

	INIT_LIST_HEAD(&resource_list);
	ret = acpi_dev_get_resources(adev, &resource_list, is_memory, NULL);
	ret = acpi_dev_get_memory_resources(adev, &resource_list);
	if (ret < 0)
		goto err_out;