提交 31e86cb9 编写于 作者: R Ryan Kennedy 提交者: Rafael J. Wysocki

ACPI / watchdog: Fix init failure with overlapping register regions

Partially overlapping regions cause platform device creation
to fail. The latter of two overlapping resources will fail to be
reserved. Fix this by merging overlapping resource ranges while
enumerating WDAT table entries.
Signed-off-by: NRyan Kennedy <ryan5544@gmail.com>
Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 520eccdf
...@@ -86,7 +86,12 @@ void __init acpi_watchdog_init(void) ...@@ -86,7 +86,12 @@ 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 (resource_contains(rentry->res, &res)) { 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;
found = true; found = true;
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册