ACPI: watchdog: 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: Hanjun Guo <guohanjun@huawei.com> Tested-by: Hanjun Guo <guohanjun@huawei.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
07aec68ecf
commit
f7499785c8
|
@ -151,11 +151,7 @@ void __init acpi_watchdog_init(void)
|
|||
found = false;
|
||||
resource_list_for_each_entry(rentry, &resource_list) {
|
||||
if (rentry->res->flags == res.flags &&
|
||||
resource_overlaps(rentry->res, &res)) {
|
||||
if (res.start < rentry->res->start)
|
||||
rentry->res->start = res.start;
|
||||
if (res.end > rentry->res->end)
|
||||
rentry->res->end = res.end;
|
||||
resource_union(rentry->res, &res, rentry->res)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue