PCI/ACPI: Replace open coded variant of resource_union()

Since we have resource_union() helper, let's utilize it here.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Tested-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Andy Shevchenko 2020-11-03 22:45:09 +02:00 committed by Rafael J. Wysocki
parent 5df38ca6af
commit 07aec68ecf
1 changed files with 1 additions and 3 deletions

View File

@ -722,9 +722,7 @@ static void acpi_pci_root_validate_resources(struct device *dev,
* our resources no longer match the ACPI _CRS, but * our resources no longer match the ACPI _CRS, but
* the kernel resource tree doesn't allow overlaps. * the kernel resource tree doesn't allow overlaps.
*/ */
if (resource_overlaps(res1, res2)) { if (resource_union(res1, res2, res2)) {
res2->start = min(res1->start, res2->start);
res2->end = max(res1->end, res2->end);
dev_info(dev, "host bridge window expanded to %pR; %pR ignored\n", dev_info(dev, "host bridge window expanded to %pR; %pR ignored\n",
res2, res1); res2, res1);
free = true; free = true;