mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
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: Ryan Kennedy <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
520eccdfe1
commit
31e86cb99a
1 changed files with 6 additions and 1 deletions
|
|
@ -86,7 +86,12 @@ void __init acpi_watchdog_init(void)
|
|||
|
||||
found = false;
|
||||
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;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue