diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-03-22 18:42:08 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-03-22 18:42:08 -0400 |
commit | 594fdbaab739f82b3a712b88beb483ca1ca250ee (patch) | |
tree | 66738bb357a997fcb41c0da10b950683e49265a5 | |
parent | 82bf43b291888599b4079244d12195d214086fa4 (diff) | |
parent | b1abf6fc49829d89660c961fafe3f90f3d843c55 (diff) |
Merge branch 'acpi-wdat'
* acpi-wdat:
ACPI / watchdog: Fix off-by-one error at resource assignment
-rw-r--r-- | drivers/acpi/acpi_watchdog.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/wdat_wdt.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/acpi_watchdog.c b/drivers/acpi/acpi_watchdog.c index 11b113f8e367..ebb626ffb5fa 100644 --- a/drivers/acpi/acpi_watchdog.c +++ b/drivers/acpi/acpi_watchdog.c | |||
@@ -74,10 +74,10 @@ void __init acpi_watchdog_init(void) | |||
74 | res.start = gas->address; | 74 | res.start = gas->address; |
75 | if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { | 75 | if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { |
76 | res.flags = IORESOURCE_MEM; | 76 | res.flags = IORESOURCE_MEM; |
77 | res.end = res.start + ALIGN(gas->access_width, 4); | 77 | res.end = res.start + ALIGN(gas->access_width, 4) - 1; |
78 | } else if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_IO) { | 78 | } else if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_IO) { |
79 | res.flags = IORESOURCE_IO; | 79 | res.flags = IORESOURCE_IO; |
80 | res.end = res.start + gas->access_width; | 80 | res.end = res.start + gas->access_width - 1; |
81 | } else { | 81 | } else { |
82 | pr_warn("Unsupported address space: %u\n", | 82 | pr_warn("Unsupported address space: %u\n", |
83 | gas->space_id); | 83 | gas->space_id); |
diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c index 6d1fbda0f461..0da9943d405f 100644 --- a/drivers/watchdog/wdat_wdt.c +++ b/drivers/watchdog/wdat_wdt.c | |||
@@ -392,7 +392,7 @@ static int wdat_wdt_probe(struct platform_device *pdev) | |||
392 | 392 | ||
393 | memset(&r, 0, sizeof(r)); | 393 | memset(&r, 0, sizeof(r)); |
394 | r.start = gas->address; | 394 | r.start = gas->address; |
395 | r.end = r.start + gas->access_width; | 395 | r.end = r.start + gas->access_width - 1; |
396 | if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { | 396 | if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { |
397 | r.flags = IORESOURCE_MEM; | 397 | r.flags = IORESOURCE_MEM; |
398 | } else if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_IO) { | 398 | } else if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_IO) { |