summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2008-11-12 05:13:50 +0300
committerLen Brown <len.brown@intel.com>2008-11-12 05:13:50 +0300
commit597e4fabb0b0c7fdfa7c2d551fd0a797aab7e53b (patch)
tree2864bd6b9a5919698bc497892927849fed53618a /drivers
parent3ad4f597058301c97f362e500a32f63f5c950a45 (diff)
parented206fac87d65917280b6c3edd3f01125d4095c9 (diff)
downloadlinux-597e4fabb0b0c7fdfa7c2d551fd0a797aab7e53b.tar.xz
Merge branch 'bugzilla-11312' into release
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/events/evxfevnt.c6
-rw-r--r--drivers/acpi/system.c19
2 files changed, 13 insertions, 12 deletions
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
index 73bfd6bf962f..211e93a90e95 100644
--- a/drivers/acpi/events/evxfevnt.c
+++ b/drivers/acpi/events/evxfevnt.c
@@ -521,6 +521,9 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
if (value)
*event_status |= ACPI_EVENT_FLAG_SET;
+ if (acpi_gbl_fixed_event_handlers[event].handler)
+ *event_status |= ACPI_EVENT_FLAG_HANDLE;
+
return_ACPI_STATUS(status);
}
@@ -571,6 +574,9 @@ acpi_get_gpe_status(acpi_handle gpe_device,
status = acpi_hw_get_gpe_status(gpe_event_info, event_status);
+ if (gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)
+ *event_status |= ACPI_EVENT_FLAG_HANDLE;
+
unlock_and_exit:
if (flags & ACPI_NOT_ISR) {
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index 1d74171b7940..6d348dce0810 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -167,7 +167,6 @@ static int acpi_system_sysfs_init(void)
#define COUNT_ERROR 2 /* other */
#define NUM_COUNTERS_EXTRA 3
-#define ACPI_EVENT_VALID 0x01
struct event_counter {
u32 count;
u32 flags;
@@ -312,12 +311,6 @@ static int get_status(u32 index, acpi_event_status *status, acpi_handle *handle)
} else if (index < (num_gpes + ACPI_NUM_FIXED_EVENTS))
result = acpi_get_event_status(index - num_gpes, status);
- /*
- * sleep/power button GPE/Fixed Event is enabled after acpi_system_init,
- * check the status at runtime and mark it as valid once it's enabled
- */
- if (!result && (*status & ACPI_EVENT_FLAG_ENABLED))
- all_counters[index].flags |= ACPI_EVENT_VALID;
end:
return result;
}
@@ -346,12 +339,14 @@ static ssize_t counter_show(struct kobject *kobj,
if (result)
goto end;
- if (!(all_counters[index].flags & ACPI_EVENT_VALID))
- size += sprintf(buf + size, " invalid");
+ if (!(status & ACPI_EVENT_FLAG_HANDLE))
+ size += sprintf(buf + size, " invalid");
else if (status & ACPI_EVENT_FLAG_ENABLED)
- size += sprintf(buf + size, " enable");
+ size += sprintf(buf + size, " enabled");
+ else if (status & ACPI_EVENT_FLAG_WAKE_ENABLED)
+ size += sprintf(buf + size, " wake_enabled");
else
- size += sprintf(buf + size, " disable");
+ size += sprintf(buf + size, " disabled");
end:
size += sprintf(buf + size, "\n");
@@ -385,7 +380,7 @@ static ssize_t counter_set(struct kobject *kobj,
if (result)
goto end;
- if (!(all_counters[index].flags & ACPI_EVENT_VALID)) {
+ if (!(status & ACPI_EVENT_FLAG_HANDLE)) {
printk(KERN_WARNING PREFIX
"Can not change Invalid GPE/Fixed Event status\n");
return -EINVAL;