Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200389
b: refs/heads/master
c: c9a8bbb
h: refs/heads/master
i:
  200387: 3b0c8ce
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Len Brown committed Jun 12, 2010
1 parent 68ada06 commit 054e1e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 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: fd247447c1d94a79d5cfc647430784306b3a8323
refs/heads/master: c9a8bbb7704cbf515c0fc68970abbe4e91d68521
18 changes: 5 additions & 13 deletions trunk/drivers/acpi/acpica/hwgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 action)
register_bit = acpi_hw_gpe_register_bit(gpe_event_info,
gpe_register_info);
switch (action) {
case ACPI_GPE_COND_ENABLE:
if (!(register_bit & gpe_register_info->enable_for_run))
return (AE_BAD_PARAMETER);

case ACPI_GPE_ENABLE:
ACPI_SET_BIT(enable_mask, register_bit);
break;
Expand Down Expand Up @@ -154,23 +158,11 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 action)
acpi_status
acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info * gpe_event_info)
{
struct acpi_gpe_register_info *gpe_register_info;
acpi_status status;

ACPI_FUNCTION_ENTRY();

/* Get the info block for the entire GPE register */

gpe_register_info = gpe_event_info->register_info;
if (!gpe_register_info) {
return (AE_NOT_EXIST);
}

/* Write the entire GPE (runtime) enable register */

status = acpi_hw_write(gpe_register_info->enable_for_run,
&gpe_register_info->enable_address);

status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_COND_ENABLE);
return (status);
}

Expand Down
1 change: 1 addition & 0 deletions trunk/include/acpi/actypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ typedef u32 acpi_event_status;

#define ACPI_GPE_ENABLE 0
#define ACPI_GPE_DISABLE 1
#define ACPI_GPE_COND_ENABLE 2

/* gpe_types for acpi_enable_gpe and acpi_disable_gpe */

Expand Down

0 comments on commit 054e1e0

Please sign in to comment.