mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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:
committed by
Rafael J. Wysocki
parent
07aec68ecf
commit
f7499785c8
@@ -151,11 +151,7 @@ void __init acpi_watchdog_init(void)
|
|||||||
found = false;
|
found = false;
|
||||||
resource_list_for_each_entry(rentry, &resource_list) {
|
resource_list_for_each_entry(rentry, &resource_list) {
|
||||||
if (rentry->res->flags == res.flags &&
|
if (rentry->res->flags == res.flags &&
|
||||||
resource_overlaps(rentry->res, &res)) {
|
resource_union(rentry->res, &res, rentry->res)) {
|
||||||
if (res.start < rentry->res->start)
|
|
||||||
rentry->res->start = res.start;
|
|
||||||
if (res.end > rentry->res->end)
|
|
||||||
rentry->res->end = res.end;
|
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user