Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202502
b: refs/heads/master
c: de4f104
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Renninger authored and Matthew Garrett committed Aug 3, 2010
1 parent 60a1952 commit 49860b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a0691c16f795cb7b69dcbaa61543e73b8865c4f
refs/heads/master: de4f10466e9347a2f1bfe39e501539557bed2c4b
20 changes: 10 additions & 10 deletions trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,12 @@ static int acpi_ec_add(struct acpi_device *device)
if (!first_ec)
first_ec = ec;
device->driver_data = ec;

WARN(!request_region(ec->data_addr, 1, "EC data"),
"Could not request EC data io port 0x%lx", ec->data_addr);
WARN(!request_region(ec->command_addr, 1, "EC cmd"),
"Could not request EC cmd io port 0x%lx", ec->command_addr);

pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
ec->gpe, ec->command_addr, ec->data_addr);

Expand All @@ -844,6 +850,8 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
kfree(handler);
}
mutex_unlock(&ec->lock);
release_region(ec->data_addr, 1);
release_region(ec->command_addr, 1);
device->driver_data = NULL;
if (ec == first_ec)
first_ec = NULL;
Expand All @@ -864,18 +872,10 @@ ec_parse_io_ports(struct acpi_resource *resource, void *context)
* the second address region returned is the status/command
* port.
*/
if (ec->data_addr == 0) {
if (ec->data_addr == 0)
ec->data_addr = resource->data.io.minimum;
WARN(!request_region(ec->data_addr, 1, "EC data"),
"Could not request EC data io port %lu",
ec->data_addr);
}
else if (ec->command_addr == 0) {
else if (ec->command_addr == 0)
ec->command_addr = resource->data.io.minimum;
WARN(!request_region(ec->command_addr, 1, "EC command"),
"Could not request EC command io port %lu",
ec->command_addr);
}
else
return AE_CTRL_TERMINATE;

Expand Down

0 comments on commit 49860b7

Please sign in to comment.