diff options
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 79b09d76c180..c036e2a69f33 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -763,8 +763,7 @@ static u32 acpi_ec_gpe_poll_handler(void *data) | |||
763 | 763 | ||
764 | acpi_disable_gpe(NULL, ec->common.gpe_bit, ACPI_ISR); | 764 | acpi_disable_gpe(NULL, ec->common.gpe_bit, ACPI_ISR); |
765 | 765 | ||
766 | status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE, | 766 | status = acpi_os_execute(OSL_EC_POLL_HANDLER, acpi_ec_gpe_query, ec); |
767 | acpi_ec_gpe_query, ec); | ||
768 | 767 | ||
769 | if (status == AE_OK) | 768 | if (status == AE_OK) |
770 | return ACPI_INTERRUPT_HANDLED; | 769 | return ACPI_INTERRUPT_HANDLED; |
@@ -799,7 +798,7 @@ static u32 acpi_ec_gpe_intr_handler(void *data) | |||
799 | 798 | ||
800 | if (value & ACPI_EC_FLAG_SCI) { | 799 | if (value & ACPI_EC_FLAG_SCI) { |
801 | atomic_add(1, &ec->intr.pending_gpe); | 800 | atomic_add(1, &ec->intr.pending_gpe); |
802 | status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE, | 801 | status = acpi_os_execute(OSL_EC_BURST_HANDLER, |
803 | acpi_ec_gpe_query, ec); | 802 | acpi_ec_gpe_query, ec); |
804 | return status == AE_OK ? | 803 | return status == AE_OK ? |
805 | ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED; | 804 | ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED; |
@@ -991,7 +990,6 @@ static int acpi_ec_poll_add(struct acpi_device *device) | |||
991 | int result = 0; | 990 | int result = 0; |
992 | acpi_status status = AE_OK; | 991 | acpi_status status = AE_OK; |
993 | union acpi_ec *ec = NULL; | 992 | union acpi_ec *ec = NULL; |
994 | unsigned long uid; | ||
995 | 993 | ||
996 | ACPI_FUNCTION_TRACE("acpi_ec_add"); | 994 | ACPI_FUNCTION_TRACE("acpi_ec_add"); |
997 | 995 | ||
@@ -1014,10 +1012,9 @@ static int acpi_ec_poll_add(struct acpi_device *device) | |||
1014 | acpi_evaluate_integer(ec->common.handle, "_GLK", NULL, | 1012 | acpi_evaluate_integer(ec->common.handle, "_GLK", NULL, |
1015 | &ec->common.global_lock); | 1013 | &ec->common.global_lock); |
1016 | 1014 | ||
1017 | /* If our UID matches the UID for the ECDT-enumerated EC, | 1015 | /* XXX we don't test uids, because on some boxes ecdt uid = 0, see: |
1018 | we now have the *real* EC info, so kill the makeshift one. */ | 1016 | http://bugzilla.kernel.org/show_bug.cgi?id=6111 */ |
1019 | acpi_evaluate_integer(ec->common.handle, "_UID", NULL, &uid); | 1017 | if (ec_ecdt) { |
1020 | if (ec_ecdt && ec_ecdt->common.uid == uid) { | ||
1021 | acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, | 1018 | acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, |
1022 | ACPI_ADR_SPACE_EC, | 1019 | ACPI_ADR_SPACE_EC, |
1023 | &acpi_ec_space_handler); | 1020 | &acpi_ec_space_handler); |
@@ -1062,7 +1059,6 @@ static int acpi_ec_intr_add(struct acpi_device *device) | |||
1062 | int result = 0; | 1059 | int result = 0; |
1063 | acpi_status status = AE_OK; | 1060 | acpi_status status = AE_OK; |
1064 | union acpi_ec *ec = NULL; | 1061 | union acpi_ec *ec = NULL; |
1065 | unsigned long uid; | ||
1066 | 1062 | ||
1067 | ACPI_FUNCTION_TRACE("acpi_ec_add"); | 1063 | ACPI_FUNCTION_TRACE("acpi_ec_add"); |
1068 | 1064 | ||
@@ -1088,10 +1084,9 @@ static int acpi_ec_intr_add(struct acpi_device *device) | |||
1088 | acpi_evaluate_integer(ec->common.handle, "_GLK", NULL, | 1084 | acpi_evaluate_integer(ec->common.handle, "_GLK", NULL, |
1089 | &ec->common.global_lock); | 1085 | &ec->common.global_lock); |
1090 | 1086 | ||
1091 | /* If our UID matches the UID for the ECDT-enumerated EC, | 1087 | /* XXX we don't test uids, because on some boxes ecdt uid = 0, see: |
1092 | we now have the *real* EC info, so kill the makeshift one. */ | 1088 | http://bugzilla.kernel.org/show_bug.cgi?id=6111 */ |
1093 | acpi_evaluate_integer(ec->common.handle, "_UID", NULL, &uid); | 1089 | if (ec_ecdt) { |
1094 | if (ec_ecdt && ec_ecdt->common.uid == uid) { | ||
1095 | acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, | 1090 | acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, |
1096 | ACPI_ADR_SPACE_EC, | 1091 | ACPI_ADR_SPACE_EC, |
1097 | &acpi_ec_space_handler); | 1092 | &acpi_ec_space_handler); |
@@ -1572,7 +1567,7 @@ static void __exit acpi_ec_exit(void) | |||
1572 | static int __init acpi_fake_ecdt_setup(char *str) | 1567 | static int __init acpi_fake_ecdt_setup(char *str) |
1573 | { | 1568 | { |
1574 | acpi_fake_ecdt_enabled = 1; | 1569 | acpi_fake_ecdt_enabled = 1; |
1575 | return 0; | 1570 | return 1; |
1576 | } | 1571 | } |
1577 | 1572 | ||
1578 | __setup("acpi_fake_ecdt", acpi_fake_ecdt_setup); | 1573 | __setup("acpi_fake_ecdt", acpi_fake_ecdt_setup); |
@@ -1591,7 +1586,7 @@ static int __init acpi_ec_set_intr_mode(char *str) | |||
1591 | acpi_ec_driver.ops.add = acpi_ec_poll_add; | 1586 | acpi_ec_driver.ops.add = acpi_ec_poll_add; |
1592 | } | 1587 | } |
1593 | printk(KERN_INFO PREFIX "EC %s mode.\n", intr ? "interrupt" : "polling"); | 1588 | printk(KERN_INFO PREFIX "EC %s mode.\n", intr ? "interrupt" : "polling"); |
1594 | return 0; | 1589 | return 1; |
1595 | } | 1590 | } |
1596 | 1591 | ||
1597 | __setup("ec_intr=", acpi_ec_set_intr_mode); | 1592 | __setup("ec_intr=", acpi_ec_set_intr_mode); |