Skip to content

Commit

Permalink
Merge branch 'acpi-wdat'
Browse files Browse the repository at this point in the history
* acpi-wdat:
  ACPI / watchdog: Fix off-by-one error at resource assignment
  • Loading branch information
Rafael J. Wysocki committed Mar 22, 2018
2 parents 82bf43b + b1abf6f commit 594fdba
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/acpi/acpi_watchdog.c
Original file line number Diff line number Diff line change
@@ -74,10 +74,10 @@ void __init acpi_watchdog_init(void)
res.start = gas->address;
if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
res.flags = IORESOURCE_MEM;
res.end = res.start + ALIGN(gas->access_width, 4);
res.end = res.start + ALIGN(gas->access_width, 4) - 1;
} else if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
res.flags = IORESOURCE_IO;
res.end = res.start + gas->access_width;
res.end = res.start + gas->access_width - 1;
} else {
pr_warn("Unsupported address space: %u\n",
gas->space_id);
2 changes: 1 addition & 1 deletion drivers/watchdog/wdat_wdt.c
Original file line number Diff line number Diff line change
@@ -392,7 +392,7 @@ static int wdat_wdt_probe(struct platform_device *pdev)

memset(&r, 0, sizeof(r));
r.start = gas->address;
r.end = r.start + gas->access_width;
r.end = r.start + gas->access_width - 1;
if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
r.flags = IORESOURCE_MEM;
} else if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {

0 comments on commit 594fdba

Please sign in to comment.