diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-11-03 22:45:10 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-11-17 18:06:29 +0100 |
commit | f7499785c8915ef4bda3cfa34c814350f07368fd (patch) | |
tree | 6d7b68d2eb00fca2a812b492a43ecb9dd3c3d55b /drivers/acpi/acpi_watchdog.c | |
parent | 07aec68ecf35a2cee5173001c70e3d7b345b3d05 (diff) | |
download | lwn-f7499785c8915ef4bda3cfa34c814350f07368fd.tar.gz lwn-f7499785c8915ef4bda3cfa34c814350f07368fd.zip |
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>
Diffstat (limited to 'drivers/acpi/acpi_watchdog.c')
-rw-r--r-- | drivers/acpi/acpi_watchdog.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/acpi/acpi_watchdog.c b/drivers/acpi/acpi_watchdog.c index 5c1e9ea43123..ca28183f4d13 100644 --- a/drivers/acpi/acpi_watchdog.c +++ b/drivers/acpi/acpi_watchdog.c @@ -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; } |